Thanks to visit codestin.com
Credit goes to github.com

Skip to content

scattergl lines don't link horizontal segments #2397

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

Closed
wangyueming opened this issue Feb 23, 2018 · 7 comments
Closed

scattergl lines don't link horizontal segments #2397

wangyueming opened this issue Feb 23, 2018 · 7 comments
Assignees
Labels
bug something broken regression this used to work

Comments

@wangyueming
Copy link

Version: Both 1.33.1 and 1.34.0.

I am sorry I can not reproduce it in codepen. I can reproduce it in Electron of version 1.7.x. Need I prepare an Electron sample?

About the code, you can refer to https://codepen.io/yueming0799/pen/mXLwYx?editors=1010, yet it works fine in codepen.

2018-02-23 10 56 39

If the mode is lines, the line is broken.


traces.push({
    x: x,
    y: y,
    mode: "lines",
    line: {
      color: "#00ff40",
      width: 2,
      dash: 'solid',
    },
    type:'scattergl'
  });

@etpinard
Copy link
Contributor

Need I prepare an Electron sample?

Yes, that would nice. Using a https://gist.github.com/ would be best.

At the very least, could you describe what's broken about it? What do you see? Any console errors? etc?

@alexcjohnson
Copy link
Collaborator

The data in the codepen is different from what you've got in your screenshot. You can use Plotly.Plots.graphJson(graphDiv) to pull out the exact plot and put that into codepen, see if that shows what you want it to.

I'm assuming what you mean by "broken" is that there are gaps in the line - which implies that some of the data was interpreted as non-numeric. Does the same thing happen if you switch to regular scatter, not scattergl?

@wangyueming
Copy link
Author

wangyueming commented Feb 26, 2018

@alexcjohnson yes, I mean there are gaps in the line. And it works as regular scatter, only has problem with scattergl.

I made a work around to fix it.

  for (let i = 0, l = data.length; i < l; i++) {
    const d = data[i];
    if (d.mode === 'lines') {
      d.mode = 'lines+markers';
      d.marker = {
        color: d.line.color,
        size: d.line.width,
        symbol: 'circle'
      };
    }
  }
  Plotly.newPlot(Setting.GRAPH_DIV, data, layout);

@wangyueming
Copy link
Author

wangyueming commented Feb 26, 2018

@etpinard I uploaded a project in [email protected]:wangyueming/plotly_bug_repeat.git.
Git clone it and run npm install & npm start, you will see the result.
4966108e-1791-4da9-9f62-2380b4abd8a3

@wangyueming
Copy link
Author

I got it repeated in codepen.
https://codepen.io/yueming0799/pen/mXLwYx?editors=0010
0d876afa-cb69-48e7-b337-54802d42257d

@etpinard
Copy link
Contributor

Thanks very much @wangyueming

This is a side-effect from the scattergl regl push. Versions previous to 1.33.0 appear to be working fine.

See https://codepen.io/etpinard/pen/oEaaVq?editors=1010 for a comparison.

cc @dfcreative (this is still a problem on master)

@etpinard etpinard changed the title scattergl line is broken scattergl lines don't link horizontal segments Feb 26, 2018
@etpinard etpinard added bug something broken regression this used to work labels Feb 26, 2018
etpinard added a commit that referenced this issue Apr 17, 2018
@etpinard
Copy link
Contributor

Fixed in #2564

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

No branches or pull requests

4 participants