Questions tagged [plotly-dash]

Dash is a framework for building data visualisation web applications. The original release was for Python, but Julia and R versions of the framework are also now available.

Dash is written on top of Plotly.js and React.js, and its Python implementation uses Flask on the backend.

Extensive documentation and a gallery of examples are available.

Dash is an open source library, released under the MIT license.

Enter image description here

Enter image description here

Enter image description here

4538 questions
20
votes
2 answers

How to change the x-axis and y-axis labels in plotly?

How can I change the x and y-axis labels in plotly because in matplotlib, I can simply use plt.xlabel but I am unable to do that in plotly. By using this code in a dataframe: Date = df[df.Country=="India"].Date New_cases =…
20
votes
5 answers

Launch a Dash app in a Google Colab Notebook

How to launch a Dash app (http://dash.plot.ly) from Google Colab (https://colab.research.google.com)?
Mac
  • 357
  • 1
  • 2
  • 6
19
votes
2 answers

What's the difference between Dash and Plotly?

I built a Flask app and i would like to embed a chart for my data using Plotly. Making some research on Plotly i found about Dash, and i'm having some troubles deciding which one of the two i need to use for my project. What's the difference between…
Jack022
  • 867
  • 6
  • 30
  • 91
18
votes
2 answers

How to give space between two dcc components in Python Dash?

What is the HTML equivalent for   (space) in Dash? html.Div( [ dcc.Input(), dcc.Input() ] )
jsonbourne
  • 915
  • 2
  • 10
  • 17
18
votes
3 answers

How to use dash callback without an Input

I am trying to call a plotly-dash callback without the Input and the method won't fire. This is a dashboard I am trying to build using dash. In the past when I use a callback with both the Input and Output everything works fine but when I tried…
Izuagbala
  • 429
  • 3
  • 10
  • 22
18
votes
2 answers

How to use a button to trigger callback updates?

I am just getting started with dash. Taking the example from here. I want to convert the dash app below import dash from dash.dependencies import Input, Output import dash_core_components as dcc import dash_html_components as html app =…
user25064
  • 2,020
  • 2
  • 16
  • 28
17
votes
5 answers

Change Line Colour with Plotly Express

I have a plotly express figure: fig = px.line(data, x="DateTime", y="Gold", title="Gold Prices") I want to change some details, like so fig.update_layout( line_color="#0000ff", # ValueError: Invalid property specified for object of type…
Robin Andrews
  • 3,514
  • 11
  • 43
  • 111
17
votes
1 answer

How to add multiple graphs to Dash app on a single browser page?

How do I add multiple graphs show in in picture on a same page? I am trying to add html.Div components to following code to update the page layout to add more graphs like that on single page, but these newly added graphs do not get shown on a page,…
dan
  • 373
  • 2
  • 5
  • 24
17
votes
6 answers

Changing the favicon in Flask/Dash

Trying to get the favicon to load I have followed suggestions from the internet: server = Flask(__name__, static_folder='static') app = dash.Dash(external_stylesheets=external_stylesheets, server=server) app.css.config.serve_locally =…
Ivan
  • 7,448
  • 14
  • 69
  • 134
17
votes
4 answers

Python: Calculate bearing between two lat/long

I am attempting to calculate the bearing between two lat/long. I don't have a question regarding the function/formula per se, provided: def get_bearing(lat1, long1, lat2, long2): dLon = (long2 - long1) y = math.sin(dLon) * math.cos(lat2) …
Sterling Butters
  • 1,024
  • 3
  • 20
  • 41
17
votes
2 answers

Python Decorator as Callback in Dash Using Dash Object That is an Instance Variable - Fails

I'm updating some code to use Dash and plotly. The main code for graphing is defined within a class. I replaced some Bokeh widgets with Dash controls, and ended up with a callback that looks like this: class MakeStuff: def __init__(self, ...,…
Jim
  • 5,940
  • 9
  • 44
  • 91
17
votes
6 answers

Python Dash: loading pandas dataframes into data table

I have been trying to build an app with Dash recently, but despite looking through the many guides, I simply cannot figure out how to import a pandas dataframe into Dash's data table (which is essentially a pandas dataframe, except web-hosted and…
Coolio2654
  • 1,589
  • 3
  • 21
  • 46
17
votes
5 answers

How do I display a website written in Dash as a static PDF (Python)?

I want to export the site I've made in dash into a static PDF. Here is the code for my site (it's just a chart with 3 columns): import dash import dash_core_components as dcc import dash_html_components as html import pdfkit from flask import Flask,…
semiflex
  • 1,176
  • 3
  • 25
  • 44
17
votes
4 answers

python: install dash with conda

How can I install dash step-by-step? I'm really new at importing packages in python. I have python 3.6.4 on my computer and I'm trying to install the dash package, dash_core_components. I tried to type in the anaconda prompt: conda install dash (not…
mcb
  • 207
  • 1
  • 2
  • 3
17
votes
4 answers

Is there a better way to perform multiple output with Dash by Plotly?

As we can see in Interactivity part of Getting started, one callback function can accept multiple inputs but always has single output. Assume that we have two blocks separately that must be updated after input change. Of course, the simplest way is…
Oleh Rybalchenko
  • 6,998
  • 3
  • 22
  • 36