Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scattergl lines trace fails with 100k points in plotly.js 1.42 #3226

Closed
jonmmease opened this issue Nov 8, 2018 · 1 comment · Fixed by #3228
Closed

scattergl lines trace fails with 100k points in plotly.js 1.42 #3226

jonmmease opened this issue Nov 8, 2018 · 1 comment · Fixed by #3228
Assignees
Labels
regression this used to work

Comments

@jonmmease
Copy link
Contributor

There seems to be a regression in 1.42 for scattegl traces with mode='lines' and >100k points.

Originally discussed in https://community.plot.ly/t/trouble-with-scattergl-lines-with-lots-of-points/15408/2

CodePen: https://codepen.io/jonmmease/pen/qQZWXB

function gaussianRand() {
  var rand = 0;
  for (var i = 0; i < 6; i += 1) {
    rand += Math.random();
  }
  return (rand / 6)-0.5;
}

// 100,000 fails
var point_num = 100000;

// 99,999 is fine
// var point_num = 99999;

var Y = [];
for (var i = 0; i < point_num; i++) {
	Y.push((gaussianRand()*8));
}

var data = [{
	type: "scattergl",
	mode: "line",
	y: Y
}]

var layout = {showlegend: false}
Plotly.plot('graph', data = data, layout = layout)

with <= 99,999 points the plot works as expected
newplot

but with >= 100,000 points the plot doesn't render and the following JavaScript error is raised

TypeError: opts.marker is undefined.          plotly-1.42.4.js:168110:1

version 1.41.3 doesn't have this error. Thanks!

@qballed
Copy link

qballed commented Nov 8, 2018

Additional data for seemingly same issue:

plotly/plotly.py#1271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression this used to work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants