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

When max_y or min_y is set, the chart line sometimes curves in such a way that peaks are invisible #823

Open
openjck opened this issue Feb 27, 2018 · 4 comments

Comments

@openjck
Copy link
Contributor

openjck commented Feb 27, 2018

Steps to reproduce

Download and open this HTML document

Actual result

Screenshot

Expected result

The chart should look something like this (achieved by removing max_y):

@openjck
Copy link
Contributor Author

openjck commented Feb 27, 2018

Any recommended workarounds?

@wlach
Copy link
Collaborator

wlach commented Feb 28, 2018

Offhand I would suggest setting the max_y to something like 2.5 as a workaround? That seems to fix the issue for me:

https://jsfiddle.net/osz2vxom/

I agree we should do better than this though. I'd guess that the fix place for the fix is in the line chart code:

https://github.com/mozilla/metrics-graphics/blob/5538f8c97e18f2c9c01246b0d717932276a5e98b/src/js/charts/line.js

@openjck
Copy link
Contributor Author

openjck commented Mar 1, 2018

I'll have to try that again. When I tried it in the project where I noticed this issue, setting a higher max_y didn't seem to work. But I must have been missing something. Thanks!

@openjck openjck changed the title When max_y is set, the chart line sometimes curves in such a way that peaks are invisible When max_y or min_y is set, the chart line sometimes curves in such a way that peaks are invisible Mar 2, 2018
@openjck
Copy link
Contributor Author

openjck commented Mar 2, 2018

The same happens with min_y, FWIW.

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