Applies to: Nevron Chart for .NET
How to add Nevron Chart control to Data Dynamics ActiveReports for .NET?
When creating a new Active report file you can drop Nevron chart control into the report area. This control becomes a control of type CustomControl. The CustomControl class has a property called Control, which returns System.Windows.Forms.Control. In Format event handler (for example) we can cast the returned value of Control property to NChartControl and continue to setup the chart control.
For example:
[C#]
System.Windows.Forms.Control control = customControl1.Control;
NChartControl nChartControl1 = (NChartControl)control;
NChart chart = nChartControl1.Charts[0];
NBarSeries bar = (NBarSeries)chart.Series.Add(SeriesType.Bar);
bar.Values.Add(4);
bar.Values.Add(1);
bar.Values.Add(2);
bar.Values.Add(3);
[VB.NET]
Dim
control
As
System.Windows.Forms.Control = CustomControl1.Control
Dim
nChartControl1
As
NChartControl =
CType
(control, NChartControl)
Dim
chart
As
NChart = nChartControl1.Charts(0)
Dim
bar
As
NBarSeries =
CType
(chart.Series.Add(SeriesType.Bar), NBarSeries)
bar.Values.Add(4)
bar.Values.Add(1)
bar.Values.Add(2)
bar.Values.Add(3)
Article ID: 55, Created On: 10/6/2010, Modified: 11/15/2010