Programmatically Created Chart and Functions
Posted: Fri Feb 24, 2012 9:18 pm
if I run this code:
I get an exception saying: IChart.FindParentForm().
It doesn't happen if I add the chart declaratively.
Any Hints?
thanks!
Code: Select all
WebChart lChart = new WebChart();
Bar lBar1 = new Bar(lChart.Chart);
lBar1.FillSampleValues(10);
lChart.Chart.Aspect.View3D = false;
Bar lBar2 = new Bar(lChart.Chart);
lBar2.FillSampleValues(10);
Line lLine = new Line(lChart.Chart);
lLine.Function = new Steema.TeeChart.Functions.MovingAverage();
lLine.Function.Period = 3;
lLine.DataSource = lBar1;
lChart.TempChart = TempChartStyle.Httphandler;
Page.Form.Controls.Add(lChart);
It doesn't happen if I add the chart declaratively.
Any Hints?
thanks!