Dynamic Y axis in graph barchart

Hello!

I have a bar chart, and the max value of each bar can be one value between 0 and 1, but sometimes, if the values are too small, it is convenient that the Y axis goes until 0.2 only, for example, or 0.8 if are too big.

Is there any chance i can do that? I dont see any options to allow the axis to change dynamically
Tried FROM 0 to auto and the graph becomes f*****d up

Hello!

I think the best solution for this is to use the auto option as you tried. Can you share a screenshot of the graph when you set this option so I can try to help you understand why it’s not working as expected?

Hey

So, here i have the min 0 and max 0.7
result:
image

For min 0 and max auto
image

disappeared

image

It seems like you are on an old version of Grafana. On which version are you?
Are you able to upgrade it and see if the issue is still there?

“auto” doesn’t work because the Grafana specifically uses the 0-100 (or 0 to 1) scale for the percent unit.

  // Some units have an implied range
  if (config.unit === 'percent') {
    if (!isNumber(config.min)) {
      config.min = 0;
    }
    if (!isNumber(config.max)) {
      config.max = 100;
    }
  } else if (config.unit === 'percentunit') {
    if (!isNumber(config.min)) {
      config.min = 0;
    }
    if (!isNumber(config.max)) {
      config.max = 1;
    }
  }

I filed a issue but it hasn’t gotten much attention.