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

Chart doesn't render using Logarithmic Scale with 0-values #3092

Closed
4Z4T4R opened this issue Aug 4, 2016 · 4 comments
Closed

Chart doesn't render using Logarithmic Scale with 0-values #3092

4Z4T4R opened this issue Aug 4, 2016 · 4 comments

Comments

@4Z4T4R
Copy link

4Z4T4R commented Aug 4, 2016

It's perfectly reasonable to model data that contains 0-values on a logarithmic scale.

Everything you need to repro is here: http://jsbin.com/yefihuxuke/edit?html,output

Also, negative values don't work at all for a logarithmic scale. You could potentially just leverage the linear scale but convert to log... I noticed the code between linear and log is pretty divergent.

I have a solution to the 0-issue that is working in my production... basically, you're taking the log10(0) which is -Infinity. Happy to issue a PR but... I haven't bothered working on any problems you'll see on horizontal charts.

After you fix that, you'll see that the data renders from the top down, inverted. So you have to add bottom to paddingTop on line 9548 of the uncompressed file.

@etimberg
Copy link
Member

etimberg commented Aug 4, 2016

There is an open PR for the 0 case in #3106. Is it possible to give that a try? If it works for you, I'll make sure it gets merged.

The negative values does need some work. I will keep this issue open to track that.

@4Z4T4R
Copy link
Author

4Z4T4R commented Aug 4, 2016

I looked around for another issue to no avail. When I tried #3106, I get a 404...

@etimberg
Copy link
Member

etimberg commented Aug 4, 2016

Sorry, that was a typo on my part. #3016 is the correct one

@etimberg
Copy link
Member

etimberg commented Oct 5, 2016

Fixed in #3016

@etimberg etimberg closed this as completed Oct 5, 2016
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