As a user I can see a permanent legend per cell
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.
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:
- It would be great if we could do something similar in Chronograf.
- 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.
w/value is a nice to have, but should be a settable option
@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?)
@russorat what should default persistent legend visibility be?
@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 default should be off.
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.
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
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
- [ ] 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

awesome! 🌈