-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Histogram does not scale to the range of new data on restyle #24
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
Comments
There seems to be a problem with it.. |
Bug confirmed. Thank very much for reporting. Histogram traces don't update on |
As mentioned in #149 (comment), this issue only affects restyle/extendTraces calls with new data outside the computed [ Here's a workaround: http://codepen.io/etpinard/pen/MKbzNv |
This is officially our oldest open bug! At more than a year and a half, it needs to go.
Generally true, but And copying over some comments from @etpinard in #149:
I would actually argue that in all of these cases the update should reset the derived attributes - for example if new colorscale or contour data expands the range, you would want to see that information unless you had explicitly hidden it. Us putting attributes back into The fix I'd propose then is - perhaps counterintuitively - to also copy the inferred |
This means that if a user wants the auto first view (e.g. say the I'm not sure how common this use case is for plotly.js users. Maybe it doesn't matter. Maybe we need another |
Ha, for colorscales it turns out we already do what I was about to propose here: if you explicitly specify So for example:
and then:
But if you don't specify So I think it's only in the context of histogram bins that this is a change - and therefore I'd consider it an inconsistency, a bug, not a breaking change, and I should implement the same logic with explicit |
If you set up a histogram...
... and then update this histogram with wider data followed by a restyle...
... the histogram keeps the old range (in this case 1 to 5) and does not scale to the range of the new data (which is the case when using scatter style plot). Here is a codepen showing this: http://codepen.io/rasmusab/pen/megKOo
I have not found any documentation regarding whether this is the expected behavior. If it is, what would be the best practice for updating a histogram with new data?
The text was updated successfully, but these errors were encountered: