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

Allow non-zero Y-axis auto range #7196

Closed
rfriedr1 opened this issue Mar 24, 2018 · 20 comments · Fixed by #41672
Closed

Allow non-zero Y-axis auto range #7196

rfriedr1 opened this issue Mar 24, 2018 · 20 comments · Fixed by #41672

Comments

@rfriedr1
Copy link

rfriedr1 commented Mar 24, 2018

When setting the y-axis of a graph to auto-range, the range alway includes the value "0" (zero).
E.g. my data are all around -27 (-27.1 to -27.6). When Auto-range is used, the range goes from 0 to -27.x which means that the data are basically only visible as a line without being bale to see the variation in the data.

See the following example. The left y-axis is holding the data with values around -27. Those are plotted in blue at the bottom of the graph.

screen shot 2018-03-24 at 4 56 50 pm

A better auto-range would be to use min(y) and max(y) as the range boundaries.

Thanks!

  • my browser and the version: Chrome, Safari
  • my operating system: OS X 10 and Windows 10
  • my databases: MySQL
  • Metabase version: 0.28.2
  • Metabase hosting environment: jar
  • Metabase internal database: H2

⬇️ Please click the 👍 reaction instead of leaving a +1 or update? comment

@tlrobinson tlrobinson changed the title y-axis auto-range bug alway includes "0" zero in range Allow non-zero Y-axis auto range May 29, 2018
@tlrobinson
Copy link
Contributor

Starting the Y-axis at values other than zero is a bit controversial as it can easily lead to misleading visualizations, especially for charts where the size of the element represents the value, i.e. bar charts (and area charts?), but we do already allow you to set it manually, so I don't see why we shouldn't allow it to auto-range as well (as long as it's not the default behavior).

However, I wonder if we should disable starting the Y-axis at non-zero values (both manual and automatic) for bar charts (and area charts?)

@rfriedr1

This comment was marked as duplicate.

gkhairulina pushed a commit to griddynamics/metabase that referenced this issue Sep 24, 2018
@nodesocket
Copy link

nodesocket commented May 15, 2019

I created an question on the forums (https://discourse.metabase.com/t/auto-y-axis-range-minimum-always-uses-0/6207/2) and was directed here.

I would actually prefer and love auto to use min y-axis value. Maybe you could add an additional checkbox [ ] Use minimum y-axis value when Auto y-axis range is checked.

@MarcGJA
Copy link

MarcGJA commented Sep 28, 2019

This would probably solve it when implemented:
#3061

@notrom

This comment was marked as duplicate.

@ohld

This comment was marked as duplicate.

@flamber flamber removed the .Proposal label Nov 10, 2021
@mkaze

This comment was marked as duplicate.

@OnlineChampion

This comment was marked as duplicate.

@nodesocket
Copy link

nodesocket commented Dec 15, 2022

This is a must have. Perhaps just a new dropdown when Auto y-axis range is toggled that specifies start at 0 or start at the minimum y value. I don't know how complicated it is to calculate the minimum y value, but this feature would be a huge addition. Currently I have to constantly adjust the min and max y-axis for each of my graphs which is a huge time suck.

@nodesocket
Copy link

auto y-axis range defaulting to 0 is a bit ridiculous. Especially when graphing time series data. I have to constantly update the min and max value manually.

Shouldn't the logic just be find the min and max value in the given time range and set those as the y-axis min and max?

@OnlineChampion

This comment was marked as duplicate.

@nodesocket

This comment was marked as duplicate.

@joshbricel

This comment was marked as spam.

@wrestlingcarbonapple
Copy link

I have a chart showing analyses for different elements. Depending on what element is chosen, the range varies from ~60 for one, and around 0.002 for another. With 0 locked in place we cannot easily see variations in the ones with larger values.
This is a must have for us and we're considering other tools because of this (and some other minor easily implemented features that we're missing).

@OlexaSkoryk

This comment was marked as spam.

@gonchik
Copy link

gonchik commented Jan 30, 2024

Any plans around that?

@alxnddr alxnddr self-assigned this Apr 11, 2024
@gonchik
Copy link

gonchik commented May 3, 2024

thank you! %)

@alxnddr alxnddr added this to the 0.50 milestone May 3, 2024
@cdeweyx
Copy link

cdeweyx commented May 23, 2024

This is merged for Metabase 50 and available now if you try out the Release Candidate 1. If you give it a spin, drop us a note with how it goes.

@notrom
Copy link

notrom commented May 23, 2024

@cdeweyx this looks great to me, I've only messed around with it so far but it's working pretty much as expected. I thought it would work on bars/rows/area but I guess it was intentional to to allow that.

I think this does highlight a small pre-existing frustration I've had around split y-axis in Metabase though, you can't configure the left and right separately (scale, title, unpin from zero etc.), settings are applied to both.

Happy with this unpin from 0 feature though! Looks good.

@cdeweyx
Copy link

cdeweyx commented May 24, 2024

@cdeweyx this looks great to me, I've only messed around with it so far but it's working pretty much as expected. I thought it would work on bars/rows/area but I guess it was intentional to to allow that.

I think this does highlight a small pre-existing frustration I've had around split y-axis in Metabase though, you can't configure the left and right separately (scale, title, unpin from zero etc.), settings are applied to both.

Happy with this unpin from 0 feature though! Looks good.

@notrom Thanks for the feedback! 🙌 We have plans to follow up with separate configuration in split axes cases in the next release, so stay tuned for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment