You can create Page and RDL reports with composite charts using the ActiveReports Chart data region. A composite chart consists of two or more series plotted along the Y-axis, where each series can display a different chart type. In ActiveReports, a composite chart may have up to six Y-axis series. You can combine the following chart types:
This walkthrough illustrates a step-by-step implementation for creating a composite chart with three Y-axis series. The walkthrough is split into the following activities:
Note:
When you complete this walkthrough you get a layout that looks similar to the following at design time and at run time.
To create an ActiveReports project in Visual Studio
See Adding an ActiveReport to a Project for information on adding different report layouts.
To connect the report to a data source
To add a dataset
SQL Query |
Copy Code
|
---|---|
SELECT * from StoreSummary
|
To add the chart data region and define plots
Property Name |
Property Values |
||
---|---|---|---|
|
Plot1 |
Plot2 |
Plot3 |
Encodings>Category>Values Bind field 'StoreName' to X-axis for each plot. |
=Fields!StoreName.Value |
=Fields!StoreName.Value | =Fields!StoreName.Value |
Encodings>Values collection editor Bind fields 'GrossSales', 'GrossProfit', and 'TotalItems' to Y-axis for each plot, respectively. |
=Fields!GrossSales.Value | =Fields!GrossProfit.Value | =Fields!TotalItems.Value |
Encodings>Color>ShowValuesName Display Legends for each plot. |
True | True | True |
LineStyle>LineColor Display selected color as the color of line in respective plots. |
Black | LimeGreen | Black |
LineStyle>LineStyle Display selected style as the style of line in respective plots. |
Solid | Solid | Solid |
LineStyle>LineWidth Display selected width as the width of line (in pts) in respective plots. |
1pt | 3pt | 1pt |
Define axes for the plots
Property Name |
Property Values |
|||
---|---|---|---|---|
|
Axis1 |
Axes2 |
Axes4 |
Axes6 |
Common>AxisType Specify axis type as X or Y. |
X | Y | Y | Y |
Common>Plots Specify plots on respective axes. |
Plot1, Plot2, Plot3 | Plot1 | Plot2 | Plot3 |
Title>Title Specify title to be displayed for each axis. |
Store Name | Gross Sales | Gross Profit | Total Items |
Labels>Format Specify format of the values displayed on each axis. |
Default | c | c | d |
Line>LineStyle>LineStyle Specify axis line styles. |
Solid | Solid | Solid | Solid |
Line>LineStyle>ShowLine Show axis lines on the plot. |
True | True | True | True |
Layout>Position Specify position of axes. |
Near |
Near |
Near | Far |
Major Grid > ShowMajorGrid Show or hide major grid lines. |
True | False | False | False |
To configure the appearance of the chart
Let us set the maximum and minimum values to limit the values for each Y axis plots. This is based on the values in the data set.
Property Name |
Property Values |
||
---|---|---|---|
Axes2 (Y axis for Plot1) |
Axes3 (Y axis for Plot2) |
Axes4 (Y axis for Plot3) |
|
Scale>Max | 27000 | 15000 | 1400 |
Scale>Min | 18000 | 9000 | 900 |
To view the report
OR