Hoetmaaiers
Hoetmaaiers

Reputation: 3503

Plotly.js scattergl not showing graph itself

To visualise a large amount of data points +9000 markers I am switching from Plotly.js 'scatter' type to 'scattergl'.

I use react-plotly.js, and the change from 'scatter' to 'scattergl' almost works. Everything is rendered fine except the markers itself. The axes, hover indications, zoom controls, ... all work.

The screenshots show the difference. Documentation about scattergl is hard to find, but am I just missing some gl specific configuration?

type scatter

type scattergl

My code to calculate the traces:

const plotData: Partial<PlotData> = {
  type: 'scattergl',
  mode: 'lines+markers',
  x: [...],
  y: [...],  
};

Upvotes: 1

Views: 828

Answers (1)

Hoetmaaiers
Hoetmaaiers

Reputation: 3503

After a long bug hunt, the solution/bug ended up being a z-index fight. I rendered the plot inside a Leaflet popup which had a canvas z-index definition set. Overriding this solved my render issue.

Upvotes: 2

Related Questions