xtrareports-2609-feature-guide-to-devexpress-reports-use-report-controls-use-charts-use-charts-in-reports.md
This topic describes how to embed a chart into a report.
Watch Video: Create a Report with Charts to Represent Reporting Data in a Graphical Form
You can use the XRChart control to add a chart to a report. This control includes 2D or 3D views to visualize data series.
| 2D Series View | 3D Series View |
|---|---|
Note
If you use 3D series in charts on Linux-based platforms, see the following instructions on how to configure your application: Use 3D Chart Series on Linux.
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, and so forth). You can select these elements in the Report Designer and customize their settings in the Properties window.
Note
The XRChart control is implemented based on the ChartControl for WinForms. Refer to the Chart Control (WinForms) article for information on possible ChartControl configurations and the XRChart class description for instructions on how to apply these configurations in reports.
The desktop and Web End-User Report Designer versions contain the Chart Designer that allow end users to create and customize charts.
End-User Report Designer for WinForms
End-User Report Designer for WPF
End-User Report Designer for ASP.NET
You can use the XRChart control in reports only. Refer to the following topics for details on how to create charts in ASP.NET, Windows Forms, and WPF applications:
| 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) |
To bind data to a chart, use the XRChart.DataSource property.
Tip
You can assign a Pivot Grid to a chart’s data source. This allows the XRPivotGrid to supply data to the chart. Refer to the Link a Chart and a Pivot Grid topic for details.
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 supply data to a chart’s series.
You can specify these settings in the following ways:
Bind each series individually
Create series dynamically
The data members assigned to the series argument and values should match the data types that the SeriesBase.ArgumentScaleType and SeriesBase.ValueScaleType properties specify.
Tip
See the WinForms Charts Documentation to learn more about a chart’s configuration.