Glossary Item Box

ActiveReports for .NET 2 Online Help Send feedback to Data Dynamics

Chart-Specific Properties

Each chart type in the ActiveReports Chart control contains specific properties that apply to it. Set the chart type and chart-specific properties in the Series Collection Editor dialog box accessed through the Series property in the property grid and in the DataPoint Collection dialog box accessed through the Points property in the Series dialog box.

When a specific property is set on the Series object, it is applied to all data points objects in the series unless a different value for the property has been set on a specific data point. In that case, the data point property setting overrides the series property setting for that particular data point. Note that for charts bound to a data source, you do not have access to the DataPoint collection in the dialog.

Setting chart-specific properties at design time

To set custom properties for a chart at design time, set the Properties attribute of the series or data points object from the Visual Studio .NET Properties Window by clicking on the Series (Collection) property and opening the Series Collection Editor dialog.

Note: If you specify the value for any of the custom properties, this value is not cleared when you change the ChartType. Although this will show properties that do not apply to certain ChartTypes, it has the advantage of keeping your settings in case you accidentally change the ChartType.

Setting chart-specific properties at run time

To set custom properties for a chart at run time on the series, reference the series by name or index and use the string Properties attribute name you wish to set.

' Visual Basic ' Sets the shape for bubbles on a bubble chart to diamond Me.ChartControl1.Series(0).Properties("Shape") = Chart.MarkerStyle.Diamond

// C# // Sets the shape for bubbles on a bubble chart to diamond this.ChartControl1.Series[0].Properties["Shape"] = DataDynamics.ActiveReports.Chart .MarkerStyle.Diamond;

To set custom properties for a chart at run time on the data points object, reference the series by name or index, reference the data point by index and use the string Properties attribute name you wish to set.

' Visual Basic ' Sets the explode factor on a doughnut chart for the second point in the series Me.ChartControl1.Series(0).Points(1).Properties("ExplodeFactor") = 0.5F

// C# // Sets the explode factor on a doughnut chart for the second point in the series this.ChartControl1.Series[0].Points[1].Properties["ExplodeFactor"] = .5f;

Chart Standard Properties

Charts and Custom Properties

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.