customizechartelement to have different colors for different calculated values

Answered
Michael T asked on June 14, 2022

in your example jsfiddle for customizechartelement,
is there a way to have different colors of a column chart based on what the average discount per country?
e.g. green if < 60, red if > 60
here is a link to the fiddle: 
https://jsfiddle.net/flexmonster/0t8gv2cp/

2 answers

Public
Michael T June 15, 2022

similarly, for grid, is it possible to add a condition that uses a variable based on the value (e.g. to dynamically set color based on value with some continuous function)? 

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster June 15, 2022

Hello, Michael,

Thank you for contacting us.

Speaking of having a different color of a column chart based on an average value, please check the following JSFiddle: https://jsfiddle.net/flexmonster/jzLup4kv/ . You are free to edit it to meet your needs.
To add a condition based on the value, you can use conditional formatting. It is used to format a cell or a range of cells based on specified criteria. Please check our documentation for reference: https://www.flexmonster.com/doc/conditional-formatting/
Here's an example illustrating such an approach: https://jsfiddle.net/flexmonster/6swesgn8/ 

We hope it helps. You are welcome to write to us in case further questions arise.

Kind regards,
Nadia

Please login or Register to Submit Answer