Stack only some of the series

  • What Grafana version and what operating system are you using?
    V8.1.0 running as a plugin on HomeAssistant.

What are you trying to achieve?
I have a data source that brings in a collection of live power readings for all the circuits in my home. The data is divided into 16 channels, each channel representing a specific circuit in my home. The 1st channel is the mains power coming in, i.e. the total power consumption of my entire home.

In theory the sum of channels 2-16 should be equal to that of channel 1. But this is not the case, as not all my circuits are monitored at this time.

Therefore, I have a need to stack Channels 2-16, but then show Channel 1 as an overlay or something, that does not contribute to the stacking, as that will double my power readings.

This is something that’s possible on Google Drive, where I can define the stacking behaviour of each series in a graph.

In the above example, Channel 1 represents the sum of all the channels, plus some difference, which includes all the circuits that are not included by Channel 2 to 6.

Being able to do this is very valuable, because it helps me identify some phantom load somewhere in my house that I have not directly instrumented. If there is a spike in the total load, but I’m not seeing it on one of the channels, then I know it’s one of my unmonitored channels that I need to go and investigate.

For more info, here is an example on Google Sheets that show what the graph looks like if all the series are stacked. This skews the total on the graph, as it’s almost double what it’s supposed to be.

I have answered my own question, after messing around for a couple of days.

In case anyone else asks this:

There is a rich set of override options to choose from. Under the All tab, I have the Stack Series option set to On, and then for the particular series that I don’t want to stack with the rest, I put an override in like below:

1 Like