-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Refactor: flexible Y-Min and Y-Max settings #6051
Refactor: flexible Y-Min and Y-Max settings #6051
Conversation
Y-Min and Y-Max is now string. New usage for both Y-Min and Y-Max (Where X is a real number): >X Y-Max/Y-Max is auto if data is above X else X <X Y-Max/Y-Min is auto if data is below X else X =X Y-Max/Y-Min is scaled to current value +/- X ~X Y-Max/Y-Min is caled to average value +/- X Example: Y-Min: <100 Y-Max: >200 If all points are within 100 and 200: Y-Min is 100 and Y-Max is 200 If some points are above 200: Y-Min is 100 and Y-Max is auto If some points are below 100: Y-Min is auto and Y-Max is 200 if some points are below 100 and above 200: Y-Min and Y-Max is auto Tests for new settings added
…into thoj-autoscaling-min-span
I just tried this out and am not able to use it very well. It might also be that I am doing it wrong, I just skimmed over the code because I did not find any documentation. |
@alexanderzobnin can you check those this ^ (a, b, c) |
@torkelo ok, will check this. |
@cfra can you explain b) and c) ? |
b) c) relate to the same usecase: b) I tried achiving this with different modifiers. Toying around with it now, the behavior seems somewhat errativ. I leave Y-Min at 0 and play with Y-Max. The test graph peaks at 126. If I don't enter anything for Y-Max, it ends up at 150. For other inputs it seems somewhat erratic as displayed in this table.
Maybe my expectations about the semantics are incorrect and what I want is not possible. The behavior of c) I would like to adjust all graphs at once to another scale e.g. to go from 0..1000 to 0..1500. For this, it would be very useful if I could define Y-Max as |
@cfra ok, I will check this. |
@cfra can you attach screenshots with incorrect behaviour? |
@alexanderzobnin Here you go, let me know if you need anything else: http://nowhere.ws/dump/cropped/ |
Do you use stack mode in this graph? I think, problem's root is here. |
Yes, the graph uses stacked mode. I uploaded the json of the graph here, if that helps. https://np.tl/paste/nMgDevPm#vBOJgWSOar1-Tz8EMl0tAY/ZVH7de+BA8DdnlENIaga |
@cfra thanks. I need to add more tests for stack mode. |
@torkelo seems, we need to move Y-min and Y-max calculating to |
@alexanderzobnin I think I have a solution for that |
I've tried this with the docker image grafana/grafana:master which reports itself as v4.2.0-pre1 (commit: 457d6c8) and the y-axis disappears completely if I enter any of these special expressions (such as >100). Has this been reverted or replaced but I just can't spot it in GitHub or is it just broken? |
I see the same behavior as vaizki. |
For anyone else who ended up here like I did, it says in the closed issue above that this PR was reverted #13076 (comment) |
Refactor of #5720