UI Builder - Pie Chart Color

Breizh
Tera Contributor

I am trying to build a "Status" page using the UI Builder. On the page are a dozen Data Visualization modules, set to pie chart. Each chart represents the status of various critical systems (servers, services, applications, etc...). The status states can be OK, DOWN, WARNING, or PAUSED. The data comes from some custom tables that are populated from API calls to a few monitoring systems. I would like to use specific colors for each of the states (Green for OK, Red for DOWN, etc...). I tried to use a custom Color Palette but that only works if a pie chart contains all the possible states. Given the 4 states, in alphabetical order (DOWN, OK, PAUSED and WARNING with RED, GREEN, BLUE and AMBER as the colors in the palette), if there is no DOWN sensor, OK will assume the 1st color, in this case RED.

So, the short version of my question: can I assign a specific color to a specific "label" in the PIe chart, and, if so, how to go about doing that?

2 REPLIES 2

Breizh
Tera Contributor

Ignore - Fixed Element Color fixed that, with the proper table

Bruno Martin
Tera Expert

Hi,

 

In the settings of your pie-chart, when you edit your report, go to the 4th tab <Style>:

Chart color --> Use several colors

Colors --> use the #hex code for the colors you want to use in your pie-chart and separate each #hex code by a comma.

ex: #10C623,#FFC300 for a pie-chart with 2 sections

Hope that helps,

BR,

Bruno