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

elasticX(true) on Composite breaks rangeChart zooming #987

Open
eteubert opened this issue Aug 14, 2015 · 7 comments
Open

elasticX(true) on Composite breaks rangeChart zooming #987

eteubert opened this issue Aug 14, 2015 · 7 comments
Labels
Milestone

Comments

@eteubert
Copy link

If elasticX(true) is enabled on a composite chart, connected to a rangeChart, it breaks rangeChart zooming. Setting elasticX(false) "fixes" the behavior.

The bug first occurs in beta.9.

jsfiddle: https://jsfiddle.net/ocxxuyL5/1/

@alan-unravel
Copy link
Contributor

Okay so beta.9 pushed the elasticX() from the parent chart down to it's children. As you can see here focus will be ignored if elasticX is set to true.
So essentially your initial behaviour got through a loophole it seems. @gordonwoodhull can you confirm if this was intended?

@eteubert
Copy link
Author

Ah ok that makes sense. It should just be mentioned in the API docs. And/or setting elasticX on composite charts should not be available then, or generate an error.

@alan-unravel
Copy link
Contributor

We could probably generate a warning of some sort and it should definitely be in the docs. I don't see why it would be disabled though since some people use composite charts without range charts.

@gordonwoodhull
Copy link
Contributor

I don't understand. What's the use case for a focus chart with elasticX? Its domain will always be set by the range chart.

Or alternately, is there a use case where some of the subcharts are elasticX but others are not? Don't they always share the X axis?

I think I must be missing something here.

@alan-unravel
Copy link
Contributor

I think you are right, I can't really think of a use-case.

@gordonwoodhull
Copy link
Contributor

I guess it could be useful to have the first render use elasticX, and then subsequently just get the domain from the range chart.

@gordonwoodhull
Copy link
Contributor

Okay, I'll consider this a documentation issue: the fact that elasticX will disable the range/focus feature is mentioned only in .focus(), not in .rangeChart() or .elasticX() and it should be mentioned those places.

@gordonwoodhull gordonwoodhull added this to the v2.0 milestone Aug 28, 2015
gordonwoodhull added a commit that referenced this issue Dec 16, 2019
elasticX can reasonably be interpreteted as "just calculate the domain for me, unless it's forced by something else"
so ignore it during redraw if this is a focus chart or mouseZoomable is active
fixes #1623, #987
gordonwoodhull added a commit that referenced this issue Dec 16, 2019
elasticX can reasonably be interpreteted as "just calculate the domain for me, unless it's forced by something else"
so ignore it during redraw if this is a focus chart or mouseZoomable is active
fixes #1623, #987
gordonwoodhull added a commit that referenced this issue Dec 22, 2019
elasticX can reasonably be interpreteted as "just calculate the domain for me, unless it's forced by something else"
so ignore it during redraw if this is a focus chart or mouseZoomable is active
fixes #1623, #987
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants