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
Feature Request: variables in X/Y-Max/Min #3935
Comments
+1 |
Similar use case for me. I have ping response time. I have a dashboard which shows today, yesterday, last week, comparison graphs. For a certain host, I may want 0-100ms as the scale, another host, on LAN, I may want to see 0-15ms scale so I can see changes on the graph. Right now I defaulted the dashboard to a certain value and have to change 3 graphs if I want to use a different scale. |
implemented in #6051 |
You're sure this was included in 6051? I still can't use template variables in Y Max, after building from most recent source code. |
They issue was reversed due to issues |
Any timeline on when it will be included again? |
Hi, Is there a way to do that ? For a memory graph for example, knowing 4 Gb are used is good but not having the max makes the graph a bit useless .. It'd be great if I was able to use a query as Y-Max (since the total is collected). |
Hi, It would be great if you could use item as Y-max, like item memory total |
Also came here looking for this feature. Very surprised everybody does not need this. |
+1 |
+1 |
+1 |
1 similar comment
+1 |
This would very much be wanted, some graphs looks a bit ridiculous without it. |
+1 |
This change is working for me, in file "graph.ts", from...
to...
With this, it accepts dashboard variables in Y-min/max. |
+1 |
@tecmatia-dp can you make a PR for this, please? |
@hryamzik see the PR, was closed tho :/ |
I like to have this with a variable or a direct query option: Edit: In this post I have some details: #8281 (comment) |
+1 |
1 similar comment
+1 |
Please just use the reaction and not spam +1 comments..... |
My #6477 was not complete. It is needed to resolve variables in axis also before running |
Would a PR that adds support for this be accepted? Or is there a reason this is tricky behavior to add and it needs further discussion about how it would be implemented? |
I created a variable to use in the max field for the gauge visualization but was surprised to find I couldn't! This is really needed. I run load tests with different loads, I have to keep changing the max value for the dashboard to look presentable. Surprised that after 4 years and all the requests, this has still not been worked on. |
+1 |
I was surprised to find this is not implemented in Grafana. Seems such an intuitive feature. So +1 for the feature request. |
How would I use a variable after changing this .ts file? I have applied the changes but don't know what to input in the 'max' field in my bar graph. |
Use $var_name like in other valid places. |
+1 |
Hi @tecmatia-dp , could you please verify if it still works in v7? This fix could help me very much, but so far it doesn't work for me. :( |
I've discovered, that after changing graph.ts file the app.7b506073f46893460c0d.js (from grafana_7.0.4_amd64.deb) webpack has to be rebuild but at this moment I've no idea how to do it. |
@wiku-PSNC , I don't know if this is still helpfull, but will post anyway. I've followed the "developer instructions" to clone and build the grafana frontend from source.Then I've updated
Finally I've replaced I don't know if there's a easier way. But for me, this works like a charm. |
@noharm Is it possible to share your build? It will greatly help. |
I've made a fresh build. You can find a tgz of the "public" directory here |
The link draws a blank page. Is there any way you can share it via github? |
I am really surprised, this seems a very basic feature (my first use for a variable is to set the Y-Max value across many charts) that almost everyone will need, and 5 years after the first post it is still not implemented. |
A small modification with your code gets y min/max variables working for me. Removing _. from this line: For my purpose it allows a text variable/s which a user can populate with a number of their choice. This was tested using Grafana 7.5.0 1619131092pre |
So in v8.1 we are adding two new transforms that will allow you to extract config like min, max, unit and thresholds from a normal query: Config from query results We are soon switching to Github discussions for feature requests, will create an issue there next week to collect feedback on these new transforms |
^Those two links are dead. What's the current status of this and how do I make it work? |
The updated links are: |
I am not sure that the above will cover my use case. As part of troubleshooting I am using grafana to display two panels for the same metric. One with the current time interval and one with a time shift (configured in a text box variable). The most common case is to use a time shift of 1 week because results between different days of the weeks can usually not be compared. In this troubleshooting scenario, it is essential that the time scales are the same. Preferably, I would also like to show the metric and time-shifted metric in the same graph to allow an even easier comparison. Now, I basically would like the option to configure the axis ranges for the two panels using a for instance a variable, or to tie the y ranges for the two panels together. It is essential that the two time ranges are the same. If I use the config from query result option than I can determine the min and max for the given time interval, but the other panel with the time shift will then still return different values for min and max. In general, it would also be a good solution to show the metric together with the time shifted metric in the same graph. |
The scope of that is different. I don't want to only be able to config the scale from a query, I want to be able to use a custom variable and change the chart with the selected option, so a regular user is able to dive into concrete max/min area of the Y axis. |
@torkelo any idea how to use the config from query? I configured it but it converts all my series' names to |
Let's say you have a set of network graphs for several servers. They all have different scale as Y-Max is set to auto. You can set it to 1073741824 ( 1 gigabit ) for all the graphs but it won't make much sense. Defining a max value with a template variable could be really helpful in this case.
The text was updated successfully, but these errors were encountered: