Currently we are programmatically adding values, labels to a chartseries within a Telerik Report.
For each item within the series, we would like to set the Item's MainColor and FillType.
Adding values and labels to ChartSeries
...ChartSeries cs = new Telerik.Reporting.Charting.ChartSeries();
Hashtable ht = ....;
double total = 0;
foreach (DictionaryEntry de in ht)
total += (double)de.Value;
foreach (DictionaryEntry de in ht)
{
cs.AddItem((double)de.Value, (String)de.Key + " " + ((double)de.Value / total).ToString("P02"));
}
The following is where we have problems. For each of the above items, we would like to set the item's color and Filltype:
int dcount = 0;
foreach (DictionaryEntry de in ht)
{
cs.Items[dcount].Appearance.FillStyle.FillType = Telerik.Reporting.Charting.Styles.FillType.Solid;
cs.Items[dcount].Appearance.FillStyle.MainColor = System.Drawing.Color.FromArgb(14, 55, 147);
dcount = +1;
}
For some reason ,however, not all the items get the above color when rendering the report (it typically works fine for the first few items).
Not sure how to proceed.