Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Collapse]Reporting
 [Expand]Product Information
 [Collapse]Creating Reports in Visual Studio
  [Expand]Adding a Report to Your .NET Application
  [Expand]Getting Started with DevExpress Reporting
  [Expand]Detailed Guide to DevExpress Reporting
  [Collapse]Detailed Guide to Visual Studio Report Designer
   [Collapse]Toolbox - Supported Report Controls
    [Expand]Using Basic Report Controls
    [Expand]Using Bar Codes
    [Collapse]Using Charts and Pivot Grids
      Providing Data to Charts
      Binding a Chart's Series to Data
      Binding a Chart to Data Using Series Templates
      Using Charts to Visualize Data in Report Groups
      Linking a Chart with a Pivot Grid
    [Expand]Using Gauges and Sparklines
    [Expand]Drawing Lines and Shapes
    [Expand]Using Custom and Third-Party Controls
   [Expand]Dock Panels and Designer Options
   [Expand]Report Wizard
 [Expand]Creating End-User Reporting Applications
 [Expand]API Reference
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Providing Data to Charts

This topic provides the most important information you need to consider when embedding a chart into a report:

Expanded Chart Overview

The XRChart control can only be used in reports. To use similar charts elsewhere in your application, use the following controls.

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 chart enables you to visualize series of points using 2D or 3D views.

2D Series View

3D Series View

A chart can display multiple series having compatible views.

Bar and Point Series

Nested Doughnut Series

A chart contains various visual elements (such as diagrams, series, legends, primary and secondary axes, titles and labels). You can select these elements in the Report Designer and customize their settings in the Property Grid.

Expanded Chart Designer

The desktop and web End-User Report Designer versions provide the Chart Designer enabling your end-users to quickly create and customize charts.


Expanded Bind a Chart to Data

To bind a chart to data, use the XRChart.DataSource property.

You can assign a Pivot Grid to a chart's data source, allowing the XRPivotGrid to supply data to the chart. To learn more about this feature, see Linking a Chart with a Pivot Grid.

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 located in a DetailReportBand obtains its data from the detail report's data source.

In most scenarios, you need to locate a chart on the report header/footer band to display a summary for the detail report data.

When placing a chart onto a group header/footer, use the XRDataFilter.ValueBinding property to allow the chart to visualize data in each report group. For a step-by-step tutorial, see Using Charts to Visualize Data in Report Groups.

Placing a chart onto the Detail band allows the chart to be printed as many times as there are records in the report's data source. Consider using a custom progress bar control instead of the chart control to visualize report detail data.

To provide data to a chart's series, specify the following settings.

Depending on whether or not you create series manually, you can specify these settings in the following ways.

The data members assigned to the series argument and values must match the data types specified by the SeriesBase.ArgumentScaleType and SeriesBase.ValueScaleType properties.

Tip

See the WinForms Charts Documentation to learn more about using charts.

How would you rate this topic?​​​​​​​