Is it possible to put graph settings into variables?

I have a lot of time series data and some of them have ratios (between 0-1) as value. I would like my dashboard to automatically switch to display percentages (0-100%) for my y-axis if the value lies within 0-1 and back to normal if not. I can’t find a solution for this so I am thinking to make a variable that allows users to select ‘numeric’ or ‘percentage’ to switch manually. But then it seems impossible. Anyone has came across with this and got any workarounds?

sorry for bad english, it’s not my first language.