'Declaration Public Sub SetComboChartSourceData( _ ByVal dataRange As System.String, _ ByVal seriesChartTypes() As ChartType, _ Optional ByVal plotByRows As System.Boolean, _ Optional ByVal cellReferenceMode As System.Nullable(Of CellReferenceMode) _ )
public void SetComboChartSourceData( System.string dataRange, ChartType[] seriesChartTypes, System.bool plotByRows, System.Nullable<CellReferenceMode> cellReferenceMode )
Exception | Description |
---|---|
System.Exception | The current value of the ChartType property is not Combo. |
System.NotSupportedException | The specified seriesChartTypes array contains one or more values which are not supported within a combo chart. |
System.NotSupportedException | The specified seriesChartTypes array contains a combination of values which would require more than the maximum allowable number of axes (two). |
Combo charts support multiple chart types within the main chart, with each different chart type being associated with one or more Infragistics.Documents.Excel.Charts.Series.
Use this method to populate the SeriesCollection for a combo chart.
For example, given a dataRange which yields three series, the caller can specify an array with three elements as the value of the seriesChartTypes parameter. Each array element is then applied to the corresponding series, in the same order in which they appear in the array.
Duplicate ChartType values can appear in the seriesChartTypes array, in which case the corresponding series appear within the same chart. For example, specifying an array with ClusteredColumn, Line, and Line results in a combo chart with the first series appearing in a clustered column chart, and the remaining series appearing in a line chart.
Specifying null for the value of the seriesChartTypes parameter is treated the same as a two-element array containing 'ColumnClustered' and 'Line', resulting in a clustered column chart for the first series, and a line chart for the remaining series.
If fewer values are present in the seriesChartTypes array than the number of series yielded from the specified dataRange, the remaining series acquire the same ChartType and AxisGroup as the last element in the seriesChartTypes array. If more values are present in the array than the number of series yielded, these values are ignored.
Certain chart type values are invalid for a combo chart; if any of these chart types are present in the array, an exception is thrown, listing the invalid chart types.
The following table lists the ChartType values which are supported in combo charts, grouped by series type:
SeriesType | ChartType (supported in combo charts) |
---|---|
Area | Area, AreaStacked, AreaStacked100 |
Bar | ColumnClustered, ColumnStacked, ColumnStacked100, BarClustered, BarStacked, BarStacked100, BarOfPie |
Line | Line, LineStacked, LineStacked100, LineMarkers, LineMarkersStacked, LineMarkersStacked100 |
Pie | Pie, PieExploded, PieOfPie, Doughnut, DoughnutExploded |
Radar | Radar, RadarFilled, RadarMarkers |
Scatter | XYScatter, XYScatterLines, XYScatterLinesNoMarkers, XYScatterSmooth, XYScatterSmoothNoMarkers |
Bubble | Not Supported |
Surface | Not Supported |
Combo charts support a maximum of two axis groups. If the combination of values in the seriesChartTypes array necessitates more than two axis groups, an exception is thrown.
Combo charts require a minimum of two Infragistics.Documents.Excel.Charts.Series. If the specified dataRange yields less that two series, an exception is thrown.
If the combination of series used in a combo chart is indistinguishable from a non-combo chart, the chart may not be recognized by Excel as a combo chart. For example, adding two series, one of type Radar and one of type RadarMarkers, is a valid combination. When opened in Excel, however, such a chart will not be recognized as a combo chart, since the combination of series does not necessitate multiple chart elements. All relevant property values are persisted, however, and there is no distinguishable difference between the original chart and the serialized one.
Target Platforms: Windows 8.1, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
View on GitHub