Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 :
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.
For example, I can do something like this :
=if(Sum({$<[asset_type] = {'1'},[asset_group]>}[asset_value])=0,PurgeChar(vColors,'#ffce44, ',vColors)
But I can have a lot of possible combinations, so I'm' looking for a smart way to do that, for example modifying my variable.
Something like :
=if(Sum({$<[asset_type] = {'1'},[asset_group]>}[asset_value])=0,vColors = PurgeChar(vColors,'#ffce44, ',vColors)
Modifying my variable and at the end 'returning' this variable but I don't know how to do that with Qlik.
Any idea ?
Thanks for your help.
Hello! 🙂
You may reach us at support@vizlib.com
or you can open a ticket after you login to our User Portal.
You can also evaluate as a free trial, by downloading and installing our Vizlib June 2019 Release.
regards
Giuseppe
Vizlib Customer Success Manager