plotly-dash

Python dash return several values inside for loop

Python dash return several values inside for loop Question: For my dash app, in order to update some graphs dynamically, I have to use a function that I named update_graphs inside a for loop. Some of the graphs contain several traces while some others only have one. The update_graphs function is called inside a callback …

Total answers: 1

Set dataframe to table in dash table python and formatting color if Negative value is red color and the Positive value is green

Set dataframe to table in dash table python and formatting color if Negative value is red color and the Positive value is green Question: this is my code import dash_bootstrap_components as dbc import pandas as pd import dash import dash_core_components as dcc import dash_html_components as html from dash import dash_table df = pd.DataFrame( { ("USDT", …

Total answers: 1

how to control max length of colum names graph in plotly dash

how to control max length of colum names graph in plotly dash Question: i have a code like that import plotly.express as px df = px.data.gapminder().query("continent == ‘Europe’ and year == 2007 and pop > 2.e6") fig = px.bar(df, y=’pop’, x=’country’, text=’pop’) fig.update_traces(texttemplate=’%{text:.2s}’, textposition=’outside’) fig.update_layout(uniformtext_minsize=8, uniformtext_mode=’hide’) fig.show() and it builds me this diagram how to …

Total answers: 1

Plotly Dash change networkx node colours in based on user input?

Plotly Dash change networkx node colours in based on user input? Question: After creating the minimal working example below, I tried to change the color of the nodes in the graphs based on user input. Specifically, I have n lists of colors (one color per node), and I would like the user to be able …

Total answers: 2

Graph plot not linking with 2 dropdown lists of Years and Months

Graph plot not linking with 2 dropdown lists of Years and Months Question: I wanted to integrate graph plot to two dropdown lists. One is for years and the other one is for months. After selecting any year from year dropdown and month from months dropdown, I wanted the graph of the month from the …

Total answers: 1

Dash app update of current value without function

Dash app update of current value without function Question: i have found a nice code on stackoverflow ( Dash app, plotly chart data outside the chart area) I have change to "pie-figure" import dash from dash import dcc from dash import html from dash.dependencies import Input, Output #from datetime import datetime import plotly.graph_objs as go …

Total answers: 1

Plotly dash: Prevent scales from remapping after interactive data filtering

Plotly dash: Prevent scales from remapping after interactive data filtering Question: I have a plot in dash of the mapbox scatter type that allows to interactively filter data points. Their size and color are determined by a common float variable. Upon filtering, the range of the relevant values (originally, say, 0-10) is reduced (for instance …

Total answers: 1

Plotly Dash `px.bar` not updating in callback function

Plotly Dash `px.bar` not updating in callback function Question: The graph in the app.layout is not updated at callback. Code is shown below, however, it requires a csv file of data that is turned into a pandas.Dataframe. I will post the first 26 rows here for reference. (This is a subset of results of the …

Total answers: 1