Conditional Coloring on Pie Chart on Canvas

Hi,
I have created a Pie Chart on canvas which consists a field severity which as two values one is ERROR and the other is WARNING. I want to show the part of WARNING in pie-chart as orange and ERROR as red. I Used below script in expression editor but it's not stable sometimes ERROR's part get Orange and WARNING's part RED and vice versa.
filters
| essql
query="SELECT severity,uuId FROM "(Index_pattern)" WHERE alarmRaisedTime > CURRENT_TIMESTAMP() - INTERVAL 1 DAYS AND host_information.Site = '#####' AND alarmType <> '#####'"
| pointseries color="severity" size="unique(uuId)"
| pie palette={palette "#feb24c" "#f03b20" gradient=false} labels=false legend="ne"
| render css=".canvasRenderEl{

}"

If anyone has some solution how can I apply condition's on coloring of pie chart it would be helpful.

Thanks in Advance

Hey there! I think what you're looking for is series styling based on label in your data. Check out the post here: Pie chart colors change

1 Like

Thanks Poff it worked :slight_smile: .

1 Like

Excellent!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.