This topic describes how to embed a chart into a report.
|2D Series View||3D Series View|
The XRChart control can display multiple series.
|Bar and Point Series||Nested Doughnut Series|
The XRChart control contains various visual elements (diagrams, series, legends, primary and secondary axes, titles and labels, etc.). You can select these elements in the Report Designer and customize their settings in the Property Grid. Refer to the XRChart class description in the API Reference documentation section for more information on these settings.
The desktop and web End-User Report Designer versions provide the Chart Designer that allow end users to create and customize charts.
You can use the XRChart control in reports only. Use the following controls to embed charts elsewhere in your application:
|Platform||Chart Control Class||Documentation|
|ASP.NET||WebChartControl||Chart Control (ASP.NET)|
|Windows Forms||ChartControl||Chart Control (WinForms)|
|WPF||ChartControl and Chart3DControl||Charts Suite (WPF)|
The XRChart control is implemented the same way as the chart controls listed in the table above. Refer to these controls' documentation for information about possible chart configurations and the XRChart class's description for instructions on how to apply these configurations in reports.
To bind data to a chart, use the XRChart.DataSource property.
When the chart data source is not assigned, the chart obtains data from the report's data source (assigned to the XtraReportBase.DataSource property). A chart can display report data in the following ways:
Specify the following settings to provide data to a chart's series.
You can specify these settings in the following ways:
Bind each series individually
Create series dynamically
Assign the data field that contains series names to the XRChart.SeriesDataMember property and specify the argument and value data members of the SeriesBase object the XRChart.SeriesTemplate property returns. Refer to the Add a Chart (Use a Series Template) step-by-step tutorial for more information.
See the WinForms Charts Documentation to learn more about a chart's configuration.