chronograf icon indicating copy to clipboard operation
chronograf copied to clipboard

As a user I can see a permanent legend per cell

Open e-dard opened this issue 9 years ago • 10 comments

One thing that would a nice to have is the ability to visualise a set of series in unison, but then be able to focus on single series.

For example, in the following Grafana graph there are multiple series.

screen shot 2017-09-08 at 11 41 53

At its most basic, the query to produce the above looks something like:

SELECT mean("memBytes") FROM "monitor"."tsm1_cache" GROUP BY "id" fill(null)

For each different "id" tag, Grafana adds a label to the legend. The really nice thing, though, is that when you click on one of the labels, the graph shows only that data, e.g., clicking on 15:

screen shot 2017-09-08 at 11 45 45
  1. It would be great if we could do something similar in Chronograf.
  2. It would be even cooler if we could have something "up top" where template variables are, that would allow us to select tag values that would then be applied to each cell in a dashboard.

To clarify (2), imagine if you had a dashboard that showed cpu, memory, disk space, load and network traffic for all your hosts. By default, each cell shows say 15 different series for 15 different hosts. It would be great if you could select host us-west-abc1 and all the cells in the dashboard would filter out all the other series where host != us-west-abc1.

e-dard avatar Sep 08 '17 10:09 e-dard

w/value is a nice to have, but should be a settable option

nhaugo avatar Jan 03 '18 21:01 nhaugo

@nhaugo @russorat

  • [ ] Should persistent legend visibility be settable on a per dashboard or per cell basis ?
  • [ ] Should the ability to toggle a series visible/invisible be only on the persistent legend, or on the hovering legend as well?
  • [ ] Does this story include any other changes to the hovering legend? (should we display a more pared down version of the hovering legend to not repeat info?)

ebb-tide avatar Jan 26 '18 21:01 ebb-tide

@russorat what should default persistent legend visibility be?

ebb-tide avatar Jan 29 '18 23:01 ebb-tide

@russorat's (previous) responses:

  • Should persistent legend visibility be settable on a per dashboard or per cell basis ? Per cell

  • Should the ability to toggle a series visible/invisible be only on the persistent legend, or on the hovering legend as well? since our hovering legend has other buttons that are clickable, this should work the same in both. filed #2723 for that.

  • Does this story include any other changes to the hovering legend? (should we display a more pared down version of the hovering legend to not repeat info?) IMO, we should keep this story focused on the static legend. If there are issues with the hovering legend, those should be filed and address in separate issues.

The behavior of clicking should be as follows:

  • click on an individual series, only that series should be selected.
  • click again on the same series, all series should be selected.
  • holding shift or command while clicking a series should toggle that series. if user removes all series from the graph, it will be empty.

ebb-tide avatar Jan 29 '18 23:01 ebb-tide

@ebb-tide default should be off.

russorat avatar Jan 29 '18 23:01 russorat

The legend on/off status should be persisted so if i leave and return to a dashboard the legend will be in the state it was left.

nhaugo avatar Jan 31 '18 17:01 nhaugo

If there are lots of series we need to come up with a way to display all of them while still showing the graph. Can we figure out a minimum size for the graph, then if we exceed that space with tags we put them on a scrollable panel? @alexpaxton

nhaugo avatar Jan 31 '18 18:01 nhaugo

Talked to @goller we're going to add a field to cell on the backend called legend that will be roughly this shape:

{
   "legend": {
    ┆   ┆ "type": "static_tags",
    ┆   ┆ "orient": "bottom",
    ┆   ┆ "other": "options if you need"
    }
}

Moved the toggle into visualization options and have most of the front-end anticipating the aforementioned shape

alexpaxton avatar Feb 01 '18 21:02 alexpaxton

  • [ ] static legend should update as quickly as the lines on the graph when switching between graph types
  • [ ] static legend should update as quickly as the lines when adding or removing metics from the graph

legend_delay_3

russorat avatar Feb 27 '18 22:02 russorat

awesome! 🌈

russorat avatar Mar 01 '18 05:03 russorat