Skip to content

Wrong bar layout on the horizontal axis when using 'histogram' in plotly-cartesian #4429

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
cebamps opened this issue Dec 17, 2019 · 1 comment · Fixed by #4439
Closed

Wrong bar layout on the horizontal axis when using 'histogram' in plotly-cartesian #4429

cebamps opened this issue Dec 17, 2019 · 1 comment · Fixed by #4439
Assignees
Labels
bug something broken

Comments

@cebamps
Copy link

cebamps commented Dec 17, 2019

When using the plotly-cartesian in place of the plotly distribution in the latest version (1.51.3, also reproducible in 1.51.1), for some inputs the histogram bars are incoherently laid out on the horizontal axis.

Some other inputs do not seem cause that issue.

The problem does not appear when substituting https://cdn.plot.ly/plotly-1.51.3.js.

Minimal reproduction of the issue

https://jsfiddle.net/c8gfb6rp/2/

var x1 = [1,3];
var x2 = [1,20];

var trace1 = {
  x: x1,
  type: "histogram",
};
var trace2 = {
  x: x2,
  type: "histogram",
};
var data = [trace1, trace2];
var layout = {barmode: "stack", height: 200, width: 400, margin: {t:30, b:30}};

Plotly.plot("plot", data, layout);

Screenshots

Here is what it looks like in the jsfiddle above.

Using plotly-cartesian (bug):
hist-plotly-cartesian

Using plotly (expected behavior):
hist-plotly

@etpinard etpinard added the bug something broken label Dec 17, 2019
@etpinard
Copy link
Contributor

Thanks for reporting!

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

Successfully merging a pull request may close this issue.

2 participants