Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Dropdown with Templates to variable

$
0
0

@0000 wrote:

Hi guys,

I have a Dashboard with 8 graphs, all graphs are configurated outside of the app.layout. I call them with for e.g figure=fig6line. All is working fine so far.

     fig6line = px.scatter(dfresult, x="Time", 
                       y="Wind Speed", 
                      color="Date",
                      title = "Wind Speed per hour",
                      hover_data=["Feed 1", "Feed 2"],
                     template=**dark**)



     app.layout = html.Div([
                  html.Div([.....
                          dcc.Graph(id="g6",style={"width":graphwidth,
                                              "height": graphheight,
                                               'display': 'inline-block', 
                                               
                                               'horizontal-align': 'right',
                                               }, 
                          figure=fig6line,
                          
                              
                              ),.........




   @app.callback(Output("g6", "style"),[Input("drop-temp", "value")])

  def update_style(value):

return {"template":"value"}

i have a dropdown menue with all possible templates from plotly. i try to change all graphs (the “dark” variable) with this dropdown menue. Is there any way to do this ? I tried also to change the mother “id6” and the figure by itself but no idea how to change this. Please help

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles