Skip to content

using fill doesnt allow to autorange the Y axis #2083

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
Princezhm opened this issue Oct 12, 2017 · 3 comments
Closed

using fill doesnt allow to autorange the Y axis #2083

Princezhm opened this issue Oct 12, 2017 · 3 comments
Labels
feature something new

Comments

@Princezhm
Copy link

Hello,

I was using your library and decided to add a gradient to a line chart, it was possible to do it, but then when I tried to use it with my real data, it started to behave incorrectly (or maybe correctly, but not for me).

the current case is the following:
I tried to add the fill option and at the same time I wanted to autorange the Y-axis, for what I saw this is not possible, it is always starting from 0 to the top of the data, but my data has little changes between them, so for example an array of my Y data would be:
[1.30140139435718, 1.301839253486102, 1.301344603988707, 1.3016157641499442, 1.301913522752397]
so, as you can see, the changes are really small, thus my range should be between [1.30, 1.31] for example, but when using fill, the autoscale option makes everything go back to [0, max].

here I created a codepen so you can see the issue using 2 plots with the same data, the only difference will be the fill option.

CodePen

Regards, Prince.

@alexcjohnson
Copy link
Collaborator

Yes, the current behavior is intentional - the idea being that if you're filling to zero, the absolute magnitude is important to represent visually, similarly to a bar chart. But I can certainly understand the interest in modifying that behavior. See also #1876

@alexcjohnson alexcjohnson added the feature something new label Oct 12, 2017
@etpinard
Copy link
Contributor

I'd vote for merging it with #1876

@alexcjohnson
Copy link
Collaborator

I'd vote for merging it with #1876

sure

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

No branches or pull requests

3 participants