grafana / grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
https://grafana.com
GNU Affero General Public License v3.0
61.61k stars 11.76k forks source link

[Feature request] Add stack/unstack toggle to panel menu #10714

Open jacekn opened 6 years ago

jacekn commented 6 years ago

Please include this information:

Currently if I want to switch between stacked and unstacked mode for graph panel I have to edit the panel and toggle "stacked" box there. It would be useful to have stack/unstack toggle next to each panel for easy way to change mode.

Justification:

I think implementation could be similar to one for https://github.com/grafana/grafana/issues/9722

torkelo commented 6 years ago

will need to be added to the panel menu, so you can click on the panel title then toggle stack from there.

AntoineThebaud commented 4 years ago

I like the ability to switch between stacked & unstacked graphs in 1 click on the Prometheus UI, it would be great to have it on Grafana also.

To (try to) improve the proposal made in the rejected PR https://github.com/grafana/grafana/pull/15885 , maybe the 'Toggle stacking' option added here could be shown/hidden based on a new parameter that would be available under Panel Edit > Visualization > Stacking & Null value like the following :

alt text

This to avoid having too much corner-cases options displayed all the time.

WDYT ?

rafaelpirolla commented 1 year ago

Isn't there any way to create a template variable and use it in the stacking JSON Model?

{
        "current": {
          "selected": true,
          "text": "Off",
          "value": "normal"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Stacked",
        "multi": false,
        "name": "stacking",
        "options": [
          {
            "selected": true,
            "text": "Off",
            "value": "normal"
          },
          {
            "selected": false,
            "text": "On",
            "value": "none"
          }
        ],
        "query": "Off : normal, On : none",
        "queryValue": "",
        "skipUrlSync": false,
        "type": "custom"
      }

And then:

"stacking": {
              "group": "A",
              "mode": "${stacking}"
},

My OCD screams every day because a colleague wants to have each row of the dashboard duplicated for stacked and non stacked data... :(

github-actions[bot] commented 23 hours ago

This issue has been automatically marked as stale because it has not had activity in the last year. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!