# Can one set Configuration Options using PlotlyJS.jl?

**URL:** <https://discourse.julialang.org/t/can-one-set-configuration-options-using-plotlyjs-jl/40357>\
**Category:** Visualization\
**Created:** [May 28, 2020, 4:43pm UTC](https://discourse.julialang.org/t/can-one-set-configuration-options-using-plotlyjs-jl/40357 "2020-05-28T16:43:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![klaff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/klaff/32/7637_2.png) [@klaff](https://discourse.julialang.org/u/klaff)\
**Post date:** [May 28, 2020, 4:43pm UTC](https://discourse.julialang.org/t/can-one-set-configuration-options-using-plotlyjs-jl/40357/1 "2020-05-28T16:43:20Z")

</div>

[This plotly.com page](https://plotly.com/javascript/configuration-options/) describes configuration options, such as `editable`, `displayModeBar`, and `displaylogo` that I would like to try from Julia and PlotlyJS.jl. Is there a way to send those options? I’ve tried as keywords in the `plot` command and they are not recognized.

EDIT: based on @PetrKryslUCSD’s code example, this `plot(plotdata,layout;options=Dict(:displaylogo=>false))` seems to work for me.

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [May 28, 2020, 4:46pm UTC](https://discourse.julialang.org/t/can-one-set-configuration-options-using-plotlyjs-jl/40357/2 "2020-05-28T16:46:50Z")

</div>

I struggled with it too. Here is something that I found to work: [https://github.com/PetrKryslUCSD/FinEtoolsBeamsVis.jl/blob/20c58ef9942024dd8118783bbef07ebebfa81f9f/src/FinEtoolsBeamsVis.jl#L202](https://github.com/PetrKryslUCSD/FinEtoolsBeamsVis.jl/blob/20c58ef9942024dd8118783bbef07ebebfa81f9f/src/FinEtoolsBeamsVis.jl#L202)

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [July 10, 2021, 7:54pm UTC](https://discourse.julialang.org/t/can-one-set-configuration-options-using-plotlyjs-jl/40357/3 "2021-07-10T19:54:59Z")

</div>

Does this still work with PlotlyJS 0.16? I get

 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/c/1cf5d37e20cf844dec6751331d4ac9ce36079022.png)  
for

```julia
julia> options = Dict(
               :showSendToCloud=>true,
                       :plotlyServerURL=>"https://chart-studio.plotly.com"
                               , :showLink=>true, :displayLogo=>false)
Dict{Symbol, Any} with 4 entries:
  :showLink => true
  :showSendToCloud => true
  :displayLogo => false
  :plotlyServerURL => "https://chart-studio.plotly.com"

julia> p=plot(rand(10, 4), layout, options=options)

```

So not as expected. Issue has been created at [What happened to the options in 0.16? · Issue #390 · JuliaPlots/PlotlyJS.jl · GitHub](https://github.com/JuliaPlots/PlotlyJS.jl/issues/390).

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [July 10, 2021, 11:37pm UTC](https://discourse.julialang.org/t/can-one-set-configuration-options-using-plotlyjs-jl/40357/4 "2021-07-10T23:37:56Z")

</div>

Looks like there was a special data structure introduced for this purpose. This works with PlotlyJS 0.16:

```julia
julia> options = PlotConfig(plotlyServerURL="https://chart-studio.plotly.com", showLink=true)

julia> p=plot(rand(10, 4), layout, config=options)

```

---

<div class="post-metadata">

**Author:** ![Dieter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dieter/32/29860_2.png) [@Dieter](https://discourse.julialang.org/u/Dieter)\
**Post date:** [December 9, 2021, 7:14am UTC](https://discourse.julialang.org/t/can-one-set-configuration-options-using-plotlyjs-jl/40357/5 "2021-12-09T07:14:26Z")

</div>

Hi PetrKrysl

Does this link still work? I can not access this page or any other page where all plotly options are explained, for instance, how to set the date names from english to other languages.

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [December 9, 2021, 3:18pm UTC](https://discourse.julialang.org/t/can-one-set-configuration-options-using-plotlyjs-jl/40357/6 "2021-12-09T15:18:47Z")

</div>

Sorry: which link do you mean? In case it is the May 2020 one: The package mentioned above has been redesigned. Here are the plotting utilities: [https://github.com/PetrKryslUCSD/FinEtoolsFlexBeams.jl/blob/c0d2a9ca63dda8a51af886e5b21e429237d6e2a4/src/VisUtilModule.jl#L239](https://github.com/PetrKryslUCSD/FinEtoolsFlexBeams.jl/blob/c0d2a9ca63dda8a51af886e5b21e429237d6e2a4/src/VisUtilModule.jl#L239)

---

<div class="post-metadata">

**Author:** ![Dieter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dieter/32/29860_2.png) [@Dieter](https://discourse.julialang.org/u/Dieter)\
**Post date:** [December 9, 2021, 4:43pm UTC](https://discourse.julialang.org/t/can-one-set-configuration-options-using-plotlyjs-jl/40357/7 "2021-12-09T16:43:48Z")

</div>

Hello,

My question addressed the topic " [Can one set Configuration Options using PlotlyJS.jl?](https://discourse.julialang.org/t/can-one-set-configuration-options-using-plotlyjs-jl/40357)"

The plotly homepage for Julia has a subpage [https://plotly.com/julia/configuration-options/](https://plotly.com/julia/configuration-options/) explaining some configurations. The at the bottom of this page mentioned link [https://github.com/plotly/plotly.js/blob/master/src/plotapi/plotconfig.js#L6](https://github.com/plotly/plotly.js/blob/master/src/plotapi/plotconfig.js#L6) does not exist

I hoped to find a section towards configs on [https://plotly.com/julia/reference/](https://plotly.com/julia/reference/).

The reason for asking was the wish to change plotly axes ticklabels for dates from english to German.

Thanks for helping!

---

<div class="post-metadata">

**Author:** ![empet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/empet/32/221303_2.png) [@empet](https://discourse.julialang.org/u/empet)\
**Post date:** [December 9, 2021, 8:13pm UTC](https://discourse.julialang.org/t/can-one-set-configuration-options-using-plotlyjs-jl/40357/8 "2021-12-09T20:13:24Z")

</div>

@Dieter  
Country specifific datetime cannot be set via configuration, but using custom `Dates.LOCALES["german"]`  
If you have a DataFrame with a column `date` in european(german) format, then you must proceed as follows:

```julia
using PlotlyJS, DataFrames, Dates
Dates.LOCALES["german"]= Dates.DateLocale(
      ["Januar", "Februar", "März", "April", "Mai","Juni",
      "Juli", "August", "September", "Oktober", "November", "Dezember"],
      ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep",
       "Okt", "Nov","Dez"],
      ["Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"], [""])

#your data frame with date given as a string "day-month-year":
df= DataFrame(date=["15-0$k-2021" for k in 1:9], A=rand(10:20, 9))
df[!, :date] = Date.(df.date, "dd-mm-yyyy") #convert strings to Date
#set Date in the format you want to be displayed in your plot:
newdate= [Dates.format(d, "dd U yyyy"; locale="german") for d in df[!, :date] ]
#or newdate=[Dates.format(d, "dd u yyyy"; locale="german") for d in df[!, :date] ]
fig = plot(
    scatter(x=newdate, y=df[!,:A], color=:symbol),
    Layout(width=700,
           title="German style date", xaxis_tickangle=-45
          )
    )

```

 ![de-date](https://global.discourse-cdn.com/julialang/original/3X/4/f/4f15c2b930098c71409e4186b5a6f61d3562f97c.png)

---

<div class="post-metadata">

**Author:** ![Dieter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dieter/32/29860_2.png) [@Dieter](https://discourse.julialang.org/u/Dieter)\
**Post date:** [December 9, 2021, 8:28pm UTC](https://discourse.julialang.org/t/can-one-set-configuration-options-using-plotlyjs-jl/40357/9 "2021-12-09T20:28:21Z")

</div>

> [@empet](#):
>
> ```julia-auto
> fig = plot(
> scatter(x=newdate, y=df[!,:A], color=:symbol),
> Layout(width=700,
> title="German style date", xaxis_tickangle=-45
> )
> )
> 
> ```

Thanks Empet, such stand alone examples are the best way to learn Julia 🙂
