Hi, I'm actually using the Vizlib library, and specially the Pie chart component.
The pie chart provides an option for custom colors.
The official website says :
Use Custom Colors You have got the freedom to choose your own collection of colors. This is particularly useful when you wish to be consistent with your corporate colors e.g.. Just specify a commma separated list of hex-colors (#4477aa,#7db8da,#b6d7ea,...) and Vizlib Pie Chart will loop through it and dynamically assign the colors to the lines.
So ok, I'm using a list of value like : '#ffce44,#f07f3c,#ea5153,#0085b9,#3f5782,#814a84,#dddf4b,#297e4c', for my colors. Each value represents a category.
For example I want to display a list of assets, categorized by asset_type. And I want that a specified asset_type got a specified color.
Everything runs well, when I have at least one asset of each asset_type, but when an asset_type is empty, the pie chart will display the wrong colors.
I've tried to use a a variable which contains my list of colors (vColors) and then with some if and the PurgeChar function, I'm able to remove the specified color from the list.