Pie chart block - Defining what is the "100%" of my variable


I’m having some trouble with Pie Chart when trying to show the number of devices in “alarm” state.

I’ve inserted two variables that are counted using Systems:

  • Number of devices in alarm state
  • Total number of devices

My problem is that the percentage is not showing as I want. It is summing the total number of both variables to define what is 100%.

As example, if the number of “devices in alarm state” is equal to “total number of devices”, the Pie chart shows half filled part when what I would like to show is a 100% filled.

It is possible to inform to Pie Chart block what is the total amount of my variable that it will correspond to 100%?


Yes, this is possible. To do this, you’ll need two attributes:

  • Number of devices in an alarm state
  • Number of devices NOT in an alarm state

Those are the two attributes that would be displayed in the Pie Chart.

I’m happy to elaborate more or answer more questions :slight_smile:

1 Like

Nice! Thanks

But is there a way to count devices without alarm state in a System?


How are you currently calculating the number of devices in an alarm state ?

I’m doing “by hand” in a workflow. I’ve created an attribute to indicate that device is in alarm. This is setted by the same condition used to generate my Events.

This attribute can be just “1” or “0”. So, i’m summing this attribute from all devices that are below my System.


Nice. In this workflow, where you’re setting the alarm attribute. I’d also set a notAlarm attribute. Whenever you update alarm you can just set notAlarm to the opposite.

We do have a current ticket out to make stuff like this easier using the Pie Chart. I’ll add this request to that ticket.

Yeah, I think this is the way! I was just wondering if there wasn’t another way to do it.

Nice, it will be a great feature! If Systems could recognize the Event state associated to devices it will let things easy!

Thanks for your attention!

1 Like