Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have several different charts but only in the pie chart the color is changing after each reload, so I have to adjust it each time again.
Why does it happen and how can I avoid this?
Thank you!
Best regards,
Michael
Go to Colors tab and Select Persistent Color...
This might solve your problem.
At first check "persisten Colors" in the tab colors of the pie chart, I think the problem is due to data changes at each reload. dimensions you used show data in a different way so color changes.
Yes, you need to make sure that your dimensions for the pie chart are loaded in the same sort order each time.
Persistent colours will retain the same colours as you drill up or down but will not guarantee the same colours between reloads. The colour ORDER will be the same.
Hi Michael
For the reasons above - the colours are assigned according to the order the dimension items appear in the chart with no selectoins
If you are confident that the number of items in the dimension will not change, then sorting by the dimension would resolve this.
Alternately, you can load the dimensions in first, in the order that you would like. Either load them in as a stand alone table (if you are feeling lazy) at the start of the script, or you can join your main table or lookup table to the pre-sorted order.
There is also a tonne of articles on managing colours in QlikView, if you are feeling adventurous you can even assign a colour to each item in the dimension.
The least complicated way to do this is to add columns in the lookup for Red, Green and blue
Item_Key, Item_Red, Item_Green, Item_Blue
Apples,255,0,0
Bananas,0,255,255
Then in the colour expression in your chart set the colour as =RGB(Item_Red, Item_Green, Item_Blue)
Erica
Or if you're feeling VERY adventurous have a look at Rob's trick here!