Skip to content

Latest commit

 

History

History
1472 lines (1165 loc) · 40.8 KB

datachart-multiple-series.adoc

File metadata and controls

1472 lines (1165 loc) · 40.8 KB

Adding Multiple Series

This topic explains, with code examples, how to create composite charts by plotting multiple types of series in the same plot area of the {DataChartName}™ control.

Introduction

The {DataChartName} supports plotting unlimited number of Series in the same chart plot area. This is accomplished by adding the various types of Series objects to the {DataChartName} control’s Series collection. Each series that is added to the chart must have a pair of appropriate types of Axis and data member mapping. For more information on this refer to the Series Requirements topic. In addition to support of plotting multiple series in any combination, some types of axes can be shared between various series (see Table 1) making composite charts a much easier process.

The following table shows types of axes supported by various series and which axes can be shared between different series in the Data Chart. Refer to the Examples section of this topic and to the Multiple Axes topic for more information on how to share axes.

Type of Category Series Valid X-Axis Valid Y-Axis Valid Radius Axis Valid Angle Axis

NumericXAxis

CategoryYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

Type of Stacked Series Valid X-Axis Valid Y-Axis Valid Radius Axis Valid Angle Axis

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

NumericXAxis

CategoryYAxis

N/A

N/A

NumericXAxis

CategoryYAxis

N/A

N/A

Type of Financial Series Valid X-Axis Valid Y-Axis Valid Radius Axis Valid Angle Axis

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

CategoryXAxis, CategoryDateTimeXAxis

NumericYAxis

N/A

N/A

Type of Scatter Series Valid X-Axis Valid Y-Axis Valid Radius Axis Valid Angle Axis

NumericXAxis

NumericYAxis

N/A

N/A

NumericXAxis

NumericYAxis

N/A

N/A

NumericXAxis

NumericYAxis

N/A

N/A

Type of Polar Series Valid X-Axis Valid Y-Axis Valid Radius Axis Valid Angle Axis

N/A

N/A

NumericRadiusAxis

NumericAngleAxis

N/A

N/A

NumericRadiusAxis

NumericAngleAxis

N/A

N/A

NumericRadiusAxis

NumericAngleAxis

N/A

N/A

NumericRadiusAxis

NumericAngleAxis

N/A

N/A

NumericRadiusAxis

NumericAngleAxis

Type of Radial Series Valid X-Axis Valid Y-Axis Valid Radius Axis Valid Angle Axis

N/A

N/A

NumericRadiusAxis

CategoryAngleAxis

N/A

N/A

NumericRadiusAxis

CategoryAngleAxis

N/A

N/A

NumericRadiusAxis

CategoryAngleAxis

N/A

N/A

NumericRadiusAxis

CategoryAngleAxis

Note
Note:

Some financial indicator series (e.g. BollingerBandsOverlay and ChaikinOscillatorIndicator) have different range of values on y-axis and they should be plotted in separated charts or have unique y-axes in the same chart. For more information, please refer to the Using Multiple Axes topic.

Examples

This section provides a few examples of using multiple series in the {DataChartName} control. Refer to topics for individual types of series for more information on data rendering rules.

Multiple Series from Mixed Groups of Series

From the previous section, you learned that series can be mixed from different groups of series. An example of this is usage of the LineSeries type from the Category Series group and the FinancialPriceSeries type from the Financial Series group. In this example, the LineSeries will plot volume of stock market and the FinancialPriceSeries type will plot stock prices (open, high, low, and close) in the same chart plot area. In addition these two series will share x-axis in order to align data points horizontally. You can apply the same logic for plotting other types of series in any combinations you want as long as Series Requirements are met.

xamDataChart RT Multiple Series.docx 01

Figure 1 – Sample implementation of LineSeries and FinancialPriceSeries sharing the same x-axis.

Multiple Overlaid Series

In the {DataChartName}, multiple series that do not share the same x-axis are rendered on top of each other (figure 2). The first series in the Series collection of the {DataChartName} control renders first and all successive series overlap the previous series. Therefore, it is recommended you use semi-transparent brushes for these series, cluster column series by sharing the same x-axis, or plot them in separate charts. In addition, adding a LineSeries to the chart that already has a ColumnSeries will render data points of the LineSeries in the middle of columns of the ColumnSeries (figure 3). This rendering rule also applies to all other non-column types of series (e.g. AreaSeries, SplneSeries etc.) when they are plotted with the ColumnSeries in the {DataChartName} control.

xamDataChart RT Multiple Series.docx 02

Figure 2 – Overlaid two ColumnSeries objects.

xamDataChart RT Multiple Series.docx 03

Figure 3 - Overlaid two ColumnSeries objects and one LineSeries object.

The following code example demonstrates plotting multiple overlaid ColumnSeries with a LineSeries.

Multiple Clustered Series

Multiple column series that share the same x-axis are rendered in clusters where each cluster represents a data point (figure 4). The first series in the Series collection of the {DataChartName} control renders as a column on the left of the cluster. Each successive series is rendered on the right of the previous series. However, adding the LineSeries type of series to clustered column series renders data points of the LineSeries in the center of the clusters (figure 5).

xamDataChart RT Multiple Series.docx 04

Figure 4 - Clustered two ColumnSeries objects

xamDataChart RT Multiple Series.docx 05

Figure 5 - Clustered two ColumnSeries objects with one LineSeries object

The following code example demonstrates plotting multiple clustered ColumnSeries with a LineSeries.