Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a small problem with defining the colors of a bar chart which contains bars per quarter. I've created the following chart by defining colors 1 to 18 manually:
this contains 16 quarters and after a year the coloring scheme is repeated. But I want to add the option to expand the dates so when the chart exceeds 18 quarters the coloring scheme does no longer match. see example:
bars 'apr-jun 2009' and 'jan-mrt 2009' do not fit the scheme because they are colors 1 and 2 of the colors properties.
does anyone have an idea how to fix this easily (without having to add an extensive expression to the dimension)?
your help is much appreciated.
regards,
Peter
Or I think an if statement in the background color of your expression along the lines of this should work...
if(wildmatch(YourDateField ,'okt-dec 20*'), rgb(???,???,???),
if(wildmatch(YourDateField , 'jul-sep 20*'), rgb(???,???,???),
if(wildmatch(YourDateField , 'apr-jun 20*'), rgb(???,???,???),
rgb(???,???,???))))
...obviously replacing the field with your dimension field and using the appropriate RGB values.
Might make more sense to create a corresponding quarter number and assign background color directly in expression.
For example:
Quarter QuarterNum
jan-mrt 2009 1
apr-jun 2009 2
jul-sep 2009 3
okt-dec 2009 4
jan-mrt 2010 1
... ...
And in expression background color: pick(QuarterNum, colorblue1, colorblue2, colorblue3, colorblue4)
Or I think an if statement in the background color of your expression along the lines of this should work...
if(wildmatch(YourDateField ,'okt-dec 20*'), rgb(???,???,???),
if(wildmatch(YourDateField , 'jul-sep 20*'), rgb(???,???,???),
if(wildmatch(YourDateField , 'apr-jun 20*'), rgb(???,???,???),
rgb(???,???,???))))
...obviously replacing the field with your dimension field and using the appropriate RGB values.
Ok thanks to both!
I'll see what works best for my application.