In my chart ( type StackedBar ), I change my chart series filled color programmtically, the StackedBars colors display fine for each series, but somehow, the corresponding series Legend color is not displaying the same color. Do I have to set the color for each series legend or anything I am missing..
here is my code
Telerik.Reporting.Processing.
Chart chart = sender as Telerik.Reporting.Processing.Chart;
Telerik.Reporting.
Chart defChart = chart.ItemDefinition as Telerik.Reporting.Chart;
defChart.SeriesPalette =
"";
int arrayPos = 0;
foreach (string s in _reporterTypeList)
{
ChartSeries serie = new ChartSeries();
serie.Type =
ChartSeriesType.StackedBar;
serie.Clear();
serie.Name = s;
serie.Appearance.LegendDisplayMode = Telerik.Reporting.Charting.
ChartSeriesLegendDisplayMode.SeriesName;
for (int year = 4; year >= 0; year--)
{
// Define the items in the series
serie.AddItem(_countByReporterTypeYearly[arrayPos, 4 - year]);
serie.Items[serie.Items.Count - 1].Appearance.FillStyle.MainColor = _serieColors[arrayPos];
}
defChart.Series.Add(serie);
arrayPos++;
}
Any help,
thankls