Hi. I use to have a RadChart that would appear on a masterpage. I now render the RadChart in a console application and save it to disk which works fine. The only thing is I can't seem to remove the label series or set the line series in the chart plot area. I think this is because unlike before, I haven't defined any ChartSeries items in my code behind. Here is my code:
This work fine. The following code doesn't work because I have no ChartSeries items:
Is there any way around this? If I try to use ChartSeries items it returns an error because I'm working with a console application.
ArrayList myList = new ArrayList(); |
myList.Add(1); |
myList.Add(2); |
myList.Add(3); |
myList.Add(4); |
RadChart radChart = new RadChart(); |
// Some formatting here |
radChart.DataSource = myList; |
radChart.DataBind(); |
radChart.Save(@"c:\mychart.png", ImageFormat.Png); |
This work fine. The following code doesn't work because I have no ChartSeries items:
foreach (ChartSeries series in radChart.Series) { |
series.Appearance.LabelAppearance.Visible = false; |
series.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Black; |
} |
Is there any way around this? If I try to use ChartSeries items it returns an error because I'm working with a console application.