d3 / d3-axis

Human-readable reference marks for scales.

Home Page:https://d3js.org/d3-axis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Axis with scaleLog base 10 yields too many labels

guilhermesimoes opened this issue · comments

Here's a reproduction of the issue: http://bl.ocks.org/guilhermesimoes/af7ef9fe50c7c71b2165

Just switch the scale to Log10.

You can see that this does not happen in the latest release of D3: http://bl.ocks.org/guilhermesimoes/15ed216d14175d8165e6

By the way, using the same examples, we can see that the latest release of D3 renders the wrong labels in a Log2 axis. There, the third red dot (100) is located between 6e+1 (60) and 1e+2 (100) which is obviously wrong.

In the d3-axis and d3-scale example this no longer happens. There, the third red dot (100) is correctly located between 64 and 128.

Thanks for the test case. I will investigate. Can’t tell yet where the problem lies.

Fixed in d3-scale 0.5.2.

My block is already working and everything 😄

Thanks for the hard work! Can't wait for the 4.0 release!