✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Create dcc.Graph in client-side


I have an app that creates graphs from big data. Users will add graphs by using the control panel (Buttons, drop-downs). So graph elements count is limitless and dynamic.

The problem is I want to render Plotly graphs in the client-side to decrease the load on the server-side.

I want to use client-side callbacks, but I can’t find how to create Plotly graphs from pure data in js.

https://dash.plotly.com/clientside-callbacks there are some examples, but these examples return layout or figure, but I want to return the complete Plotly element( dcc.Graph ) in js.

When I type this to create an element for example:

 var h2Element = document.createElement("H2");   

Undefined not found error returned by dash. So I need help.

Thank you :slight_smile: