Discussion Board for collaboration related to QlikView App Development.
Is it possible to fix colors to the values in a Bar Chart?
My chart shows the RAG Status count across a selection of projects. The RAG status dimension is sorted as so:
if (RAG='On Target',1,if (RAG='Marginal',2,if (RAG='Moderate',3,if (RAG='Significant',4,if (RAG='Critical',5,if (RAG='Not Found',6,if (RAG='Not Reported',7,8)))))))
And the Colors palette is arranged in matching order.
All works fine if I have one or more values for each RAG count. However, if a count is zero the color is assigned to the next value in line, when what I want is the color skipped too.
This is visible in the example below where there are no 'Critical' projects, so Red() is used for the bar that shows the count of projects where the RAG is 'Not Found', when I want it to be skipped.
Not sure I'm answering your question properly, but here's a clip from the Chart Properties: Colors tab. The radio button options for each color are 'Solid Color' and Calculated, with the calculated script simply being Green(), Yellow(), etc.
Is that what you're asking?
You may also try the persistent colors option. If that doesn't work in this case, then set the background color expression where you can specify the RGB value or the color(n) function to select from the pallette. You can use the same expression for both sorting and color:
Match(RAG,'On Target',Marginal',Moderate','Significant','Critical','Not Found','Not Reported')
Color(Match(RAG,'On Target',Marginal',Moderate','Significant','Critical','Not Found','Not Reported'))
Hi, you can create and load a table of color.
In my exemple below, I have three colors and i use JudgColor field in the background color expression. It's very useful for maintainability when you have to change colors, it avoid to change in each object.
,rgb(R,G,B) as JudgColor
As a rookie you've introduced me to some new commands, so thanks for that. However, it appears the settings in the Colors tab take precedence over what I set in the Background Colors expression of the Dimension. So it didn't work. 😞
Jean-Baptiste - loading a JudgmentsColors table and creating a JudgColor expression expanded by knowledge of what I can do with QlikView. However, nothing I have done seems to override the settings in the Colors tab, so I'm still at square one.