(Obsolete) Chart Report Item Overview
- The Chart report item is now superseded by the more advanced Graph report item. The Graph is most often used for building powerful OLAP and Pivot charts.
- The Chart report item is not supported in .NET Core projects and in projects deployed on Azure.
- The complete Chart report item documentation is available as a
CHM
file up to Telerik Reporting version 8.2.14.1204, and can be downloaded from your Telerik account.
The Chart report item is used to display a chart on a report.
Binding to Data
To bind the Chart report item, use either of the following approaches:
- From the Report Designer, set the
DataSource
property of the Chart. - Use the
NeedDataSource
event of the Chart.
When you are in the NeedDataSource
event, you have to process the Chart item, for example:
private void chart1_NeedDataSource(object sender, System.EventArgs e)
{
Telerik.Reporting.Processing.Chart procChart = (Telerik.Reporting.Processing.Chart)sender;
procChart.DataSource = your_datasource;
}
Private Sub chart1_NeedDataSource(sender As Object, e As System.EventArgs)
Dim procChart As Telerik.Reporting.Processing.Chart = DirectCast(sender, Telerik.Reporting.Processing.Chart)
procChart.DataSource = your_datasource
End Sub
Customizing the Chart
To customize the Chart, right-click the item and select Properties from the context menu to open the Chart Wizard.
Key Features
Customizable Chart types—The Chart provides the Bar, Stacked Bar, Stacked Bar 100%, Pie, Gantt, Bezier, Spline, Spline Area, Stacked Spline Area, Stacked Spline Area 100%, Point, Bubble, Line, Area, Stacked Area, Stacked Area 100%, and CandleStick series.
Automatic text-wrapping—Text elements in the Chart can be wrapped automatically.
Data-binding—The obsolete Chart item is a Data item and uses the Data Source Components to bind to data. Once you define the data source, you can use the Property Editor or code to select which data columns will be used to populate the Chart.
Wizard—The Chart Wizard provides the most commonly used properties of the Chart in an intuitive way and enables you to quickly set up the basic structure of the report item. To invoke the Chart Wizard, use the context menu that appears when you right-click the Chart report item and select Properties.
Second Y axis—Except for the Pie Chart, all Chart series include an X and Y axis. Typically, the
ChartPlotArea.YAxis
displays values and theChartPlotArea.XAxis
displays categories. For example, theChartPlotArea.YAxis
may display items sold or revenue, while theChartPlotArea.XAxis
may indicate Months or Products. The X axis can also display values. The Chart provides a secondChartPlotArea.YAxis2
Y-axis property for displaying a second scale of measurements.Empty values—The Chart automatically approximates missing values between known data points, simply by setting the Empty property to true on any chart series item. This works for bar, line and area based chart types. You also have complete control over the visual style of empty values. The empty value style can be articulated separately from the style for the main values.
Scale breaks—The scale breaks allow you to "break off" large chunks of the axis so that graphs with large amplitude are easier to read. Scale breaks are available for both YAxis and YAxis2 of the plot area. You can tailor the maximum number of breaks, the minimum interval between data points before a break can occur, the visual size of the breaks, and the visual style of the breaks.
Marked zones—PlotArea marked zones are ranges that you can label and fill with color to highlight areas of the Chart or to visually group data. By default, the
MarkedZones
property displays behind the chart series. You can create any number of members for theMarkedZones
collection and each marked zone is defined by a starting and ending X and Y value pairs. You can also control the labeling and appearance for each zone independently.Styling—The Chart offers a set of properties to modify the look and feel of its elements.
Next Steps
- Telerik UI for ASP.NET AJAX Chart Documentation
- (API) Chart
- Demo Page for Telerik Reporting
- Knowledge Base Section