In ActiveReports, you can use the ChartControl to present data graphically in a report. The chart offers you 17 core chart types along with all of their variations, plus access to properties that control every aspect of your chart's appearance.
The ChartControl presents a series of points in different ways depending upon the chart type you choose. Some chart types display multiple series of data points in a single chart. Add more information to your chart by configuring data points, axes, titles, and labels. You can modify all of these elements in the Properties Window.
When you first drop a ChartControl onto a report, the Chart Wizard appears, and you can set up your chart type, appearance, series, titles, axes, and legend on the pages of the wizard. You can specify a data source on the Series page.
Property | Description |
---|---|
BlackAndWhiteMode | Gets or sets a value indicating whether the chart is drawn in black and white using hatch patterns and line dashing to designate colors. |
AutoRefresh | Gets or sets a value indicating whether the chart is automatically refreshed (redrawn) after every property change. |
Backdrop | Gets or sets the chart's background style. |
ChartAreas | Opens the ChartArea Collection Editor where you can set properties such as axes and wall ranges, and you can add more chart areas. |
ChartBorder | Gets or sets the chart's border style. |
ColorPalette | Gets or sets the chart's color palette. |
DataSource | Gets or sets the data source for the chart. |
GridLayout | Gets or sets the layout of the chart's areas in columns and rows. |
Legends | Opens the Legend Collection Editor where you can set up the chart's legends. |
Series | Opens the Series Collection Editor where you can set up the series collection for the chart. |
Titles | Opens the Titles Collection Editor where you can set up titles in the header and footer of the chart. |
UIOptions | Gets or sets user interface features for the chart. Choose from None, ContextCustomize, UseCustomTooltips, or ForceHitTesting. |
Culture | Gets or sets the chart's culture used for value output formatting. |
ImageType | Sets or returns the image generated by the chart. Choose from Metafile or PNG. |
Chart Commands and Dialogs
With the control selected on the report, in the Commands section at the bottom of the Properties window, you can click any of the commands to open a dialog. Commands in this section include:
- Clear Chart clears all of the property settings from the chart so that you can begin with a clean slate. You are given an opportunity to cancel this action.
- Load allows you to load a saved XML file containing a chart that you created using the ChartControl.
- Save As allows you to save the current chart to an XML file that you can load into a ChartControl on any section report.
- Customize opens the main Chart Designer dialog where you can access Chart Areas, Titles, Series, Legends, and Appearance tabs. This dialog has access to more of the customizable areas than the wizard, but all of the properties in this dialog are also available in the Properties window.
- Wizard reopens the Chart Wizard that appears by default when you first drop a ChartControl onto a report.
- Data Source opens the Chart Data Source dialog where you can build a connection string and create a query.