CityofToronto / bdit_king_pilot_dashboard

Dashboard for King St Pilot
GNU General Public License v3.0
4 stars 2 forks source link

Dashify Javascript Components #27

Open radumas opened 6 years ago

radumas commented 6 years ago

Possible to create dash plugins from Javascript (e.g. d3.js viz) by create React components of the visualizations, which can then integrate with other Dash elements (like callbacks from buttons)

Alternatively, there's a hacky approach

More details on the proper approach

radumas commented 6 years ago

There are three options for this:

  1. Create dash plugins from Javascript (e.g. d3.js viz) by create React components of the visualizations, which can then integrate with other Dash elements (like callbacks from buttons). More details
  2. There's a hacky approach where dash serves and stores the data in a hidden div and the d3.js visualizations reference that div for interactivity.
  3. We repurpose the Dash components into "pure plotly.js" by using the plotly.py which allows one to write code in Python and save it as html+js, and then work on integrating all the visualizations using Javascript