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

Dissimilar histogram bins when they should default to all the same #50

Closed
fparga opened this issue Nov 30, 2015 · 3 comments
Closed

Dissimilar histogram bins when they should default to all the same #50

fparga opened this issue Nov 30, 2015 · 3 comments

Comments

@fparga
Copy link

fparga commented Nov 30, 2015

Histogram charts display some text on hover even when the bins are empty.
This only seems to happen in "Compare data on hover" mode.

JSBin: https://jsbin.com/pamafun/2/edit?js,output

example:
hover on empty bins 1
hover on empty bins 2

@fparga fparga changed the title Hover text for empty bins on histogram Hover text for empty histogram bins Nov 30, 2015
@fparga
Copy link
Author

fparga commented Dec 4, 2015

Okay I got this wrong, I think in fact labels does not show because each trace has its own bins. Stacking happens then almost by chance when some bins happens to be the same for several traces.
When only certain types of labels are displayed for a value it means that this bin only exists for this trace.

So it's definitely a bad name for this issue.

Is there a way to have a stacked histogram, with several traces binned in the same way. Where binning wouldn't be set manually but determined by an algorithm using the aggregation of all traces as input?

@alexcjohnson
Copy link
Contributor

@Ni-Hil That's definitely a bug, and leads to a highly misleading chart. If you don't specify bins explicitly, grouped or stacked histograms need to all get the same bins.

@alexcjohnson alexcjohnson changed the title Hover text for empty histogram bins Dissimilar histogram bins when they should default to all the same Dec 4, 2015
@alexcjohnson
Copy link
Contributor

@etpinard from #42 (comment):

Calculating histogram autobins from all traces might break some plots that maneuver around that problem.

Wouldn't any plot maneuvering around this do so by setting manual bins (so altering autobin wouldn't affect them)? You're right that we need to be careful not to change the autobin results much if at all in cases where it gives a decent result... but that should be manageable. And given that the plot step matches bar widths anyway, I think it's safe to say it's always a bad choice when grouped or stacked histograms use different bins - I'd go so far as to say it mucks up the central metaphor of binning!

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

No branches or pull requests

2 participants