Chart Scaling Woes

Metabase has a feature for line charts called ‘Auto y-axis range’ that automatically scales the y-axis value range, presumably based on the actual data values. That’s the theory anyway. What actually happens is you end up with a chart that almost always renders something close to a straight line which is also jammed up at the top of the chart. Kind of like this:

image

What should be produced (or rather what I would like to see) is a line displaying as much variation as the data allows with the median value centered on the chart, like this:

image

Currently, the only way to accomplish this is to turn off the auto ranging, entering min and max values. This works fine as long as the expected range of variation is known. If the range is unknown, you can end up with over- and under-shoots, like this:

image

The ideal solution would improve on the existing mechanism for setting the auto ranging by allowing the user to set two deltas representing a) the delta between the maximum data value and the maximum y-axis chart value and b) the delta between the minimum data value and the minimum y-axis chart value. This would center the plot and provide as much resolution as possible.

Am I missing and existing capability? Anyone experience the same a find an alternate solution?Suggestions?

Hi @kdorsey

Someone else had similar question - Auto y-axis range minimum always uses 0
I think the label of “Auto y-axis-range” should have been “Auto y-axis max value” to avoid any confusion.
It might not be a real fix, but if you change “Y-axis scale” from “Linear” to “Log”, does that visualize the way you want?

But I agree, it’s currently a tiny bit confusing - either the label or the functionality. You should create a new issue and the post the link here for reference.

Same issue here, found these two on GitHub:
When manually setting ranges in chart settings, defaults should be min() and max of the series, not 0 and 100 #3061 by salsakran in 2016 sounds like a real good idea but it really would be much better built into the auto-range mechanism itself,
and
Allow non-zero Y-axis auto range #7196 by rfriedr1 in 2018 has good points too.

So it’s doable. Facing the same painful issue here as with over half my data being timeseries allot of things that look like this


should automatically take the min and max of the underlying data into account and look more like this

3 Likes