Hi,
I have added 9 colors itmes to PEs, duplicate color as coming in chat, as show in picture . How to prevent it. Is possible to assign the color order based on Weight of chat example Red for biggest ratio, green to less, etc...
thanks.
private void chartPEs(Infragistics.Win.UltraWinChart.UltraChart uc)
{
uc.ColorModel.ModelStyle = Infragistics.UltraChart.Shared.Styles.ColorModels.CustomSkin;
uc.ChartType = ChartType.PieChart;
uc.ColorModel.Skin.PEs.Clear();
uc.ColorModel.Skin.ApplyRowWise = true;
uc.ColorModel.Skin.PEs.Add(new Infragistics.UltraChart.Resources.Appearance.PaintElement(Color.FromArgb(104, 115, 122)));
uc.ColorModel.Skin.PEs.Add(new Infragistics.UltraChart.Resources.Appearance.PaintElement(Color.FromArgb(229, 142, 26)));
uc.ColorModel.Skin.PEs.Add(new Infragistics.UltraChart.Resources.Appearance.PaintElement(Color.FromArgb(179, 8, 56)));
uc.ColorModel.Skin.PEs.Add(new Infragistics.UltraChart.Resources.Appearance.PaintElement(Color.FromArgb(116, 115, 169)));
uc.ColorModel.Skin.PEs.Add(new Infragistics.UltraChart.Resources.Appearance.PaintElement(Color.FromArgb(253, 187, 48)));
uc.ColorModel.Skin.PEs.Add(new Infragistics.UltraChart.Resources.Appearance.PaintElement(Color.FromArgb(79, 114, 29)));
uc.ColorModel.Skin.PEs.Add(new Infragistics.UltraChart.Resources.Appearance.PaintElement(Color.FromArgb(186, 188, 190)));
uc.ColorModel.Skin.PEs.Add(new Infragistics.UltraChart.Resources.Appearance.PaintElement(Color.FromArgb(141, 200, 85)));
uc.ColorModel.Skin.PEs.Add(new Infragistics.UltraChart.Resources.Appearance.PaintElement(Color.FromArgb(125, 170, 190)));
uc.PieChart.OthersCategoryPercent = double.Parse(utxVarious.Text.ToString());
}
this is the sample
Hi
MN said:Good question! Let's say I have a Yes-No Pie Chart with red and green wedges. I'll always want No to be on the Red Wedge. How do I create this behavior programmatically?
You could use CustomPalette (see attached code above). Also I made small sample for you. Please take a look at the attached sample for more details.
Regards
Good question! Let's say I have a Yes-No Pie Chart with red and green wedges. I'll always want No to be on the Red Wedge. How do I create this behavior programmatically? Thanks.
Hi ,
thanks it works fine.
HI,
Have you been able to resolve your issue ? Did you have a time to try my suggestion. Let me know if you have any questions.