Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I am trying to get different shares of a blue for my pie chart based on rank.
Colors should be a more darker version of the blue based on their rankings in terms of total cost: so #1 should have lighter version of blue and as the rank increases in terms of total cost, the color should incrememtally get darker.
can this be done in more efficient way other than me typing each rank and color as a seperate line ? if you guys have any ideas it would be highly appreciated. Thanks,
here is what i am planning on using (also attaching a qvw for the example)
if(rank(sum(GrandTotalCost))=1, rgb(0,159,195),Blue())
Would be helpful if you guys have an idea to get this done in an efficient manner. Thanks,
You can use the Colormix() functions or ARGB() with some calculations to map your ranking to colors, something like
ColorMix1(
(Count(TOTAL Distinct Country)-Rank(-Sum(GrandTotalCost)))/Count(TOTAL DISTINCT Country)
, White() , Blue())
[agreed, white() is an extreme color, used just for demonstration]
Hi,
already having sorted by sum(GrandTotalCost) there's no need for ranking anymore:
RGB((1-(RowNo()-1)/(NoOfRows()-1))*200, (1-(RowNo()-1)/(NoOfRows()-1))*200, 255)
or similar to Stefan using colormix:
ColorMix1((RowNo()-1)/(NoOfRows()-1),RGB(200,200,255),Blue())
hope this helps
regards
Marco
... and to feed the popular discussion about the pie chart's pros and cons (Gysbert, are you around?) some "historical background": ye-olde-pie-chart-debate
enjoy
Marco