Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there an alternative to get the legend included for a stacked bar chart when colouring is done by expression?
If multi-coloured is chosen instead (to keep the legend) - how can I get the exact name or code for the system selected colours - so that a pie chart (for example) next to this with same categories can be set with matching colours?Missing legend from stacked bar
For the latter you can create a table that details each color for each dimension value so that you can control each color to your liking. If you need i can send an example.
A nice trick (which i didn't know until very recently) to have Qlik generate some machine colors that will be the same between 2 charts (like a stacked bar where the 2nd dimension is the same dimension used in a seperate pie chart) is as follows :
color(fieldindex('City',City))
where 'city' is arbitrary and represents the name of the grouping and City is a field name that represents your 2nd dimension in the stacked bar and only dimension in the pie.
Give it a try !
Thanks Jonathan,
Okay I made sure persistent colours were set for the pie chart I have next to the stacked bar chart – and that has kept same categories/same colours – great!
The stacked bar chart has a legend if colour by dim, but as soon as I select by expression the legends vanishes…I have seen this issue also on a blog somewhere else.
Not such an issue now that I have matching colours for multiple charts though
I will try your colour (fieldindex) – an example would be to have if possible.
Thanks again!
Gus Feltham
Senior Data Analyst | Corporate Services
+64 4 912 0352 x352
Hi gus - i actually editted my reply when i saw that your post was in Qlik Sense. I think you saw both my first (for qlikview) post and eddited post (for qlik sense)
...which product are you using ?
My mistake for not placing in the query sorry (I should edit my post) – I’m using qlik sense sever (updated version)
cheers
Gus Feltham
Senior Data Analyst | Corporate Services
+64 4 912 0352 x352