Hello everyone,
I have a problem with Scattergl used inside a Dash app. The error message in the browser is as follows:
The normal Scatter plot works fine. Interesting is, that Scattergl works fine, when writing it to a html file and viewing it in the browser.
The following code reproduces the issue (usegl = True):
import plotly.graph_objects as go
import dash
import dash_core_components as dcc
import dash_html_components as html
usegl = True
if usegl:
fig = go.Figure(
data=go.Scattergl(
x=[1, 2, 3],
y=[0, 1, 0],
)
)
else:
fig = go.Figure(
data=go.Scatter(
x=[1, 2, 3],
y=[0, 1, 0],
)
)
# this works fine with both, Scatter AND Scattergl:
fig.write_html('result.html')
# this doesn't work with Scattergl -> error message in the browser: "cannot read property 'length' of null"
app = dash.Dash()
app.layout = html.Div(
children=dcc.Graph(
figure=fig
)
)
app.run_server(debug=True)
These are the versions I’m working on:
dash 1.11.0
dash-core-components 1.9.1
dash-html-components 1.0.3
dash-renderer 1.4.0
dash-table 4.6.2
plotly 4.6.0
Any thoughts about that? Has anyone seen this before? The thing is, that I would love to use Dash, but without Scattergl I have no fun displaying my large data set.
Thank you very much in advance!