Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support auto grid min/max when using log scale #3090
When using log scale, it seems the auto grid min/max no longer works.
Here's an example graph using the default "auto" for the axis and a linear scale:
With the lowest value around 1.6s, the Y-axis naturally starts around 1s (not 0).
But then when enabling the log scale, the graph essentially becomes unusable without some minimum value due to the long exponential onramp from 0 to 1 taking up the vast majority of the available screen space.
Part of this was previously mentioned in #2829.
would be nice,
for anyone with time to give it a try, would love help :)
I'm not familiar enough with git to push this myself, but here's the fix in graph.js for this issue:
I tested it locally and would be grateful if somebody could test/push this code - cheers!
PS - On a related note: The number formatting for small numbers (e.g. 0.0000123) doesn't look good to me. Maybe adding an option to force exponential notation would improve things? By (ab-)using negative decimals for this, a single line in kbn.toFixed(value, decimals) would suffice: