A colleague asked me an interesting question today..
In Microsoft Reporting Services is it possible to control the colour of a pie chart segment.
The scenario they outline is as follows:
If you have a report that is grouped by customer and each customer record shows a pie chart of the product groups they purchased. Is it possible to ensure that each time the graph is repeated the same product group gets the same colour regardless of its ranking?
I had a quick poke around and it seems that it is not possible to control the colour of a specific segment. This is not surprising given the nature of a chart at design time.
So how does the chart choose which segment gets which colour. My suspicion is that it is based on the order the results appear in the dataset. IF this is the case then ensuring that each group has the full set of segments and that the segments are sorted by the segment name should ensure that each chart has the same segment colour codes.
I have yet to fully test this hypothesis but it seems plausible.
I suppose the other answer is to use SQL Server 2005 Reporting Services and code your own custom chart control.
Does anyone have any ideas?