Hi, how can I set custom color for Doughnut3D slices ?
I've this code, and I want that "Slice 1" in Blue, "Slice 2" in Green, "Slice 3" in Red and "Slice 4" in Yellow. I need to use my personal colors.
// CODE
rcTimes.DefaultView.ChartArea.DataSeries.Clear();
rcTimes.DefaultView.ChartLegend.Header = string.Empty;
DataSeries serPT = new DataSeries();
Doughnut3DSeriesDefinition sdWorking = new Doughnut3DSeriesDefinition();
sdWorking.ShowItemLabels = false;
serPT.Definition = sdWorking;
DataPoint dp = new DataPoint(report.WorkingTime.TotalSeconds);
dp.LegendLabel = "Slice 1";
serPT.Add(dp);
dp = new DataPoint(report.WorkingExtraTime.TotalSeconds);
dp.LegendLabel = "Slice 2";
serPT.Add(dp);
dp = new DataPoint(report.PauseTime.TotalSeconds);
dp.LegendLabel = "Slice 3";
serPT.Add(dp);
dp = new DataPoint(report.AlarmTime.TotalSeconds);
dp.LegendLabel = "Slice 4";
serPT.Add(dp);
rcTimes.DefaultView.ChartArea.DataSeries.Add(serPT);
I've this code, and I want that "Slice 1" in Blue, "Slice 2" in Green, "Slice 3" in Red and "Slice 4" in Yellow. I need to use my personal colors.
// CODE
rcTimes.DefaultView.ChartArea.DataSeries.Clear();
rcTimes.DefaultView.ChartLegend.Header = string.Empty;
DataSeries serPT = new DataSeries();
Doughnut3DSeriesDefinition sdWorking = new Doughnut3DSeriesDefinition();
sdWorking.ShowItemLabels = false;
serPT.Definition = sdWorking;
DataPoint dp = new DataPoint(report.WorkingTime.TotalSeconds);
dp.LegendLabel = "Slice 1";
serPT.Add(dp);
dp = new DataPoint(report.WorkingExtraTime.TotalSeconds);
dp.LegendLabel = "Slice 2";
serPT.Add(dp);
dp = new DataPoint(report.PauseTime.TotalSeconds);
dp.LegendLabel = "Slice 3";
serPT.Add(dp);
dp = new DataPoint(report.AlarmTime.TotalSeconds);
dp.LegendLabel = "Slice 4";
serPT.Add(dp);
rcTimes.DefaultView.ChartArea.DataSeries.Add(serPT);