Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

dcc.Graph with Scattergl renders empty after update to Plotly 6 #5336

Closed
Assignees
gvwilsonemilykl
Labels
P1needed for current cyclebugsomething brokenregressionthis used to work
@fgiaret

Description

@fgiaret

The sample code below plots a Figure with some Scattergl traces, rendered inside a dcc.Graph component.
Each trace has mode “lines+text”.
With Plotly 5 this used to work as expected; after updating to Plotly >= 6.0.0, the graph component still loads, but no data points are visible.
No errors are shown in the browser console or Python logs (as a note, Dash 3 was used).

Sample Code

importdashfromdashimportdcc,htmlimportplotly.graph_objsasgoimportnumpyasnp# Generate data for many scattergl tracesnum_points=10000num_traces=4traces= []foriinrange(num_traces):x=np.arange(num_points)y=np.random.rand(num_points)+icustomdata= [f"Trace{i+1} - Point{j}"forjinrange(num_points)]labels= [f"Trace{i+1} - Point{j}"ifj==0else""forjinrange(num_points)]trace=go.Scattergl(x=x,y=y,mode='lines+text',name=f'Trace{i+1}',customdata=customdata,text=labels,textposition='top center',hovertemplate="%{customdata}<br>X: %{x}<br>Y: %{y}<extra></extra>"    )traces.append(trace)# Create the figurefig=go.Figure(data=traces)fig.update_layout(title=f'ScatterGL with{num_traces} Traces',xaxis_title='X',yaxis_title='Y')# Create Dash appapp=dash.Dash(__name__)app.layout=html.Div([html.H1("Dash ScatterGL Example"),dcc.Graph(figure=fig)])if__name__=="__main__":app.run(debug=True)

Turning Scattergl mode from “lines+text” into “lines” restores the expected behaviour.
Playing with the number of traces or data points seems to have no effect.

Environment
The issue occurs with the following environment:

Python version: 3.9.7
Dash version: 3.2.0
Plotly version: 6.3.0
Browser: Chrome 139
OS: Windows 11
As already mentioned, downgrading Plotly (e.g. from version 6.3.0 to 5.24.1) restores the expected behaviour.

Metadata

Metadata

Labels

P1needed for current cyclebugsomething brokenregressionthis used to work

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp