Hello,
I'm using the PieChart3D and all is going well except my color scheme. I'm doing the following (see below) to set the colors and on the whole it's working except that one color always seems to be duplicating despite the fact that I have at most 10 slices of pie. Whatsmore it is always the same slices which are using duplicate colors. What am I doing wrong?
thanks very much,
chart.ColorModel.ModelStyle = Infragistics.UltraChart.Shared.Styles.ColorModels.CustomLinear;chart.ColorModel.AlphaLevel = (Byte)125;chart.ColorModel.CustomPalette = new Color[ { Color.Red, Color.Blue, Color.Green,Color.Yellow,Color.Purple,Color.Orange,Color.Silver,Color.Navy,Color.Khaki,Color.Coral,Color.MistyRose,Color.DarkKhaki,Color.DarkSeaGreen,Color.LightSteelBlue,Color.Violet,Color.HotPink};
Thanks for your help. I experimented with varying amount of colors (I didn't go as high as 37 though) and had little success but I realized that the order of the dataset has quite a big impact. In my case I was ordering by the sector name which with causing a scattering of colors as items were being picked out from random (not really random but can be thought as such) points in the dataset and put into the "other" group. I realised that if I order by the amount descending then this produces a more predictable spread of colour with less (or no) duplication.
I don't know if you guys have any control of the documentation but it would be worth mentioning this somewhere because it's not obvious at first and has quite a large impact on the coloring of the pie chart (or any other chart I imagine).
Cheers,
Your first notion is correct, the colors are applied before the smaller slices are grouped together into the "Others" category.
The thing about setting the OthersCategoryPercent was just to illustrate this point that the colors are being applied before the grouping. Hope this helps, and let me know how it goes -Paul
So are you saying that the colours are applied before the "Others" grouping is taking place? After making the last post I had a feeling that might be the case. Or is it because I'm not explicitly setting an OthersCategoryPercent?
Your problem is that you actually have 36 data points, but only 16 colors chosen. What occurrs is that the smallest 27 data points are grouped together as the "Others Category." This will become very clear if you just add this line:
this.UltraChart1.PieChart3D.OthersCategoryPercent = 0;
Then you will see how the slices' colors are repeating according to your color scheme. You could just specify 20 more colors so you don't get any repeats, or just let the chart assign colors. I hope this helps and let me know if you need some more help -Paul
Hi,
I think the problem might be that my dataset is quite large but most of them are bundled together under other. Below is an example dataset and an image of my chart. In this case it is the light pink color that is duplicated:
http://img512.imageshack.us/img512/3033/piechartuv4.png
2712607.00 Accountants and other professional advisers2429437.00 Agriculture and Food Manufacturing836471.00 Banks and lenders643606.00 Business Support Services86377.00 Charities863103.00 Commercial Developer852295.00 Construction1003407.00 Corporates and SMEs74685.00 Created 1st Test Conversion - Not in list483735.00 Developers North - DO NOT USE - TO BE MOVED6008575.00 Developers South - DO NOT USE - TO BE MOVED234888.00 Education966538.00 Energy and natural resources256452.00 Engineering and manufacturing42809.00 Housebuilder150443.00 Independent Financial Advisers944765.00 Insurers (defendant)549240.00 Leisure37857.00 Marine32698.00 Media and publishing507188.00 Not Specified at Conversion2390234.00 Other284624.00 Primary care and health8223.00 Private Capital Direct8582364.00 Private client1227952.00 Private Wealth4380212.00 Public sector and local authorities2143.00 Real estate funders1996455.00 Real estate investors2471702.00 Retailers527996.00 Social housing1097413.00 Sport202154.00 Technology370752.00 Transport and distribution262863.00 Urban Regeneration4917415.00 Volume PI introducers (claimant)