Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Hoping this can be done and perhaps someone could advise?
I have 6 pie-charts on the same sheet. Each chart has <=17 categories. I want to ensure that the colours are the same on each chart for a given category. However, note that one chart may have say 10 categories, another may have 16 etc.
Essentially, category x should be red in all charts, category y should be yellow in all charts.
Is there anyway I can do this?
Regards
Revlin
=if(isnull(category),red(),Color(col))
if you want to use your if statement it'll be:
=if(isnull(category),red(),if(category=1,green(),if(category=2,yellow().....................)
using background color for expression
So would I create an if statement, one for each category then specifying a colour right?
I thought there would be a way via the Colors tab
HI
Try persistent color in color tab..That may also help you i think
try this app
(assign colors to each category by inline table)
and use color expression by function Color()
Hi Pari
Sorry but I only have the personal edition of QV at the moment so cannot open other files. Could you copy and paste the code?
code is very simple:)
data:
LOAD * INLINE [
category, value
1, 1
2, 1
3, 1
4, 1
5, 1
6, 1
7, 1
8, 1
9, 1
10, 1
];
colors:
LOAD * INLINE [
category, col
1, 1
2, 2
3, 3
4, 4
5, 5
6, 6
7, 7
8, 8
9, 9
10, 10
];
what a suggest is to load only one table into your qvw file (colors)
+ read about color() function
and set on each chart expression backgroud : =Color(col)
Ok all good now. I have user if statements for each category within the background colour. The only porblem now is when 'other' is presented. Other is a differnet colour. Any ideas?
=if(isnull(category),red(),Color(col))
if you want to use your if statement it'll be:
=if(isnull(category),red(),if(category=1,green(),if(category=2,yellow().....................)