plotly-dash

plot.ly(dash_core_components) slider color change

白昼怎懂夜的黑 提交于 2020-05-27 04:16:34
问题 I've met plot.ly dash yesterday for the first time and created some interactive plot. And I added dash_core_components.Slider() object like below code. dcc.Slider( id='month--slider', min=0, max=12, value=12, step=None, marks={'1': '1', '6': '6', '12': {'label': '12', 'style': {'color': 'red'}}} ) I've read help(dcc.Slider) but I couldn't find the way to change the skyblue color of my slider below. So my question here...Is it possible to change the color(or style) of default slider of plot.ly

Is there a python plotly/dash image widget that can render numpy array data?

谁说胖子不能爱 提交于 2020-05-15 03:45:08
问题 I'm in the process of evaluating python plotly and/or dash as an alternative to bokeh/holoviews for linked plots that update images. Requirements: linking data point to image: I have scatter plots and heatmaps in which individual data points represent values derived from images. I would like to link back from a data point in a scatterplot to the image that the numerical value for this data point was derived from. The image data is in a numpy array or can be provided by a callback function. I

display datatable after filtering rows from dropdown list in dash

寵の児 提交于 2020-05-09 15:56:13
问题 I'm new to Dash. I would like to make a app, where I can select values from dropdown filter, filter dataset and display the data table. I'm using dash_table. My example app code is below. No datatable is shown. Does anyone know what I did wrong? How can I render dash table in dash app? import dash import dash_html_components as html import dash_core_components as dcc import dash_table as dt from dash.dependencies import Input, Output import pandas as pd df = pd.read_csv('https://raw

How to get all selected values of dynamically selected dropdown in a single list?

╄→尐↘猪︶ㄣ 提交于 2020-04-18 05:44:41
问题 How do I get all values of dynamically selected dropdown in a single list? I tried doing callback inside callback with for loop iteration, but unable to get the desired list. The issue with def a_function where callback inside a callback is present. How to get in a single list of multiple dropdowns which is dynamically updated? import dash import dash_core_components as dcc import dash_html_components as html step = html.Div( children=[ "Menu:", dcc.Dropdown(options=[{'label': v, 'value': v}

How to convert a Plotly 'Funnel' Dashboard to Dash Dashboard?

∥☆過路亽.° 提交于 2020-04-11 11:59:28
问题 I am trying to convert this simple plotly funnel dashboard to a Dash dashboard: from plotly import graph_objects as go fig = go.Figure(go.Funnel( y = ["Website visit", "Downloads", "Potential customers", "Requested price", "invoice sent"], x = [39, 27.4, 20.6, 11, 2])) fig.show() Output: I have written the following piece of code for Dash but no luck. import dash import dash_core_components as dcc import dash_html_components as html from plotly import graph_objects as go app = dash.Dash() app

Disable “Submit” button for 30 seconds in Python + Dash

天大地大妈咪最大 提交于 2020-04-11 05:50:06
问题 I want to stop the user from pressing the "Submit" button for 30 seconds, after they have pushed it in the script below. How would I go about doing this? This is how my code looks currently: import dash from dash.dependencies import Input, Output, State import dash_core_components as dcc import dash_html_components as html app = dash.Dash() app.layout = html.Div([ dcc.Input(id='my-id', value='initial value', type="text"), html.Button('Submit', id='button'), html.Div(id='my-div') ]) @app

How to enable and disable the logarithmic scale as a viewer in Plotly?

依然范特西╮ 提交于 2020-03-23 21:40:29
问题 I am recently exploring Plotly and I wonder if there is a way for sharing a plot and let the viewer switch between a logarithmic axis and linear axis. Any suggestion? 回答1: Plotly has a dropdown feature which allows the user to dynamically update the plot styling and/or the traces being displayed. Below is a minimal working example of a plot where the user can switch between a logarithmic and linear scale. import plotly import plotly.graph_objs as go x = [1, 2, 3] y = [1000, 10000, 100000] y2

Summary statistics display in the front end dashboard

杀马特。学长 韩版系。学妹 提交于 2020-03-05 04:07:26
问题 I wanted to inquire, i am using dash, how to display a value computed from the back end? say I am going to show the sum (in the front end) of the Sales column from a dataframe df in the backend, so, how should i set up the dashboard? i understand i will have the line below for the output, html.Div(id='sum') but how do i set the callback? @app.callback(Output('sum', 'children'), [Input('df', 'value')]) def get_sum('Sales'): sum = df["Sales"].sum return 'Grand Total = "{}"'.format(sum) thank

Summary statistics display in the front end dashboard

好久不见. 提交于 2020-03-05 04:06:10
问题 I wanted to inquire, i am using dash, how to display a value computed from the back end? say I am going to show the sum (in the front end) of the Sales column from a dataframe df in the backend, so, how should i set up the dashboard? i understand i will have the line below for the output, html.Div(id='sum') but how do i set the callback? @app.callback(Output('sum', 'children'), [Input('df', 'value')]) def get_sum('Sales'): sum = df["Sales"].sum return 'Grand Total = "{}"'.format(sum) thank

Several inputs for one single call back (dash, python, bootstrap)

大城市里の小女人 提交于 2020-03-04 15:38:05
问题 I am currently working on a website and I am using python, dash and bootstrap. I am making cards from bootstrap for hundreds of items. The problem is on each cards there is an edit button that when clicked will pop up a modal with the information on that item. I have no clue on how to create one callback for for every single one of these items. from collections import OrderedDict import dash import pandas as pd import dash_bootstrap_components as dbc import dash_core_components as dcc import