Static
$tStatic
nextTrue if Microsoft Excel scales a 3-D chart so that it's closer in size to the equivalent 2-D chart. The rightAngleAxes property must be True
Returns or sets the shape of Series bars. Applicable only to 3D bar-type charts.
This property is applicable only to the following chart types:
Use this property to set the bar shape for all series bars.
To set the shape for a particular series bar, use the Series.barShape property.
Gets or sets the cell where the bottom-right corner of the shape resides.
This anchor cell, along with the topLeftCornerCell, determines where the shape will be positioned on the worksheet. In addition, the bottomRightCornerPosition and topLeftCornerPosition properties allow for finer control of the shape's position.
The cell where the bottom-right corner of the shape resides.ArgumentException The value assigned is a cell whose worksheet is not the same as this shape's worksheet.
ArgumentNullException The value assigned is null and this shape already exists on a worksheet or group.
Gets or sets the position in the bottomRightCornerCell of the shape's bottom-right corner, expressed in percentages.
These percentages are expressed as distance across the associated dimension of the cell, starting at the top-left corner of the cell. For example, (0.0, 0.0) represents the top-left corner of the cell, whereas (100.0, 100.0) represents the bottom-right corner of the cell. (50.0, 10.0) would represent the location in the cell which is centered horizontally, and a tenth of the way down from the top.
The position in the bottom-right corner cell of the shape's bottom-right corner.ArgumentOutOfRangeException Either coordinate of the value assigned is outside the range of 0.0 to 100.0.
Returns or sets an chartTitle object.
Specifies the chart type.
All chart types are supported by the WorksheetChart type; no derived classes exist or are necessary to support different chart types.
Note that changing the chart type may cause related property values to be changed.
For example, when transitioning from a chart type which supports line markers, The Series.markerStyle property is changed to reflect the new chart style.
Using another example, when transitioning from a chart type which does
not support
Returns or sets the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent).
Returns or sets the way that blank cells are plotted on a chart.
Returns or sets the size of the hole in a doughnut chart, expressed as a percentage of the size of the encompassing circle.
This property is only applicable to doughnut charts.
The valid range for this property is 0 through 90, inclusive.
Returns or sets a ChartDropLines instance which determines the appearance for a stock chart's drop lines.
This property is only applicable for stock charts.
High/low lines are not displayed by default; to enable them, assign a ChartDropLinesto this property. to null.
Gets or sets the fill to use in the background of the shape.
Note: some shapes, such as connectors or groups, cannot have a fill set. For these shapes, the value on this property will be ignored and lost when the workbook is saved.
A ShapeFill-derived instance describing the fill of the shape, or null for no fill.Returns or sets the angle which determines the origin of the first slice, as relative to the 12 o'clock position of the emcompassing circle.
This property is only applicable to pie and doughnut charts.
The valid range for this property is 0 through 360, inclusive. Fractional angles are not supported; nor are negative angles.
By default, the first slice begins at the "12 o'clock" position of the pie chart, i.e., the top center point of the encompassing circle.
Use this property to offset the origin of the first slice; for example, a value of 30 positions the first slice at the 1 o'clock position, 60 at the 2 o'clock position, 90 for 3 o'clock, etc.
Larger values move along the circumference of the emcompassing circle in a clockwise direction, with a value of 0 or 360 both coinciding with the 12 o'clock position.
Gets or sets the value which indicates whether the shape is flipped horizontally along the vertical center line.
InvalidOperationException The value is set to True and this shape doesn't allow flipping or rotating, such as a WorksheetChart.
Gets or sets the value which indicates whether the shape is flipped vertically along the horizontal center line.
InvalidOperationException The value is set to True and this shape doesn't allow flipping or rotating, such as a WorksheetChart.
Returns or sets the gap depth in a 3-D chart, expressed as a percentage of the marker width. The value of this property must be between 0 and 500.
Returns or sets the distance between the data series in a bar chart, as a percentage of the marker width. The value of this property must be between 0 and 500.
Returns or sets the height of a 3-D chart as a percentage of the chart width (between 5 and 500 percent).
Returns or sets a ChartHighLowLines instance which determines the appearance for a stock chart's high/low lines.
This property is only applicable for stock charts.
High/low lines depict the high and low prices for a stock chart.
High/low lines are displayed by default; to disable them, set this property to null.
Gets or sets the outline to use for the shape.
Note: some shapes, such as comments or groups, cannot have a outline set. For these shapes, the value on this property will be ignored and lost when the workbook is saved.
A ShapeOutline-derived instance describing the outline of the shape, or null for no outline.Returns or sets a value that represents the perspective for the 3-D chart view, expressed in degrees.
This property supports values within the inclusive range of 0 and 120.
True if only visible cells are plotted. False if both visible and hidden cells are plotted.
Gets or sets the way shapes will be repositioned in excel when cells before or within the shape are resized.
This value will not be saved for shapes contained in a WorksheetShapeGroup, which inherit their positioning mode from their parent group.
The way shapes will be repositioned in excel when cells before or within the shape are resized.InvalidEnumArgumentException The value assigned is not defined in the ShapePositioningMode enumeration.
True if the chart axes are at right angles, independent of chart rotation or elevation. Applies only to 3-D line, column, and bar charts.
Returns or sets the rotation of a 3-D chart view around the X-axis, expressed in degrees.
This property controls the viewing perspective by rotating the chart around the horizontal axis, such that the top of the chart appears to move closer or further away.
This property is only applicable to 3D charts.
Returns or sets the rotation of a 3-D chart view around the Y-axis, expressed in degrees.
This property controls the viewing perspective by rotating the chart around the vertical axis, such that the left edge of the chart appears to move closer or further away.
This property is only applicable to 3D charts.
Returns or sets the size of the second plot area in a 'bar of pie' or 'pie of pie' chart, expressed as a percentage of the first plot area's size.
This property is only applicable for the BarOfPie and PieOfPie
This property supports values in the range of 5 to 200, inclusively.
Determines the
This property is only applicable for the BarOfPie and PieOfPie
Gets or sets the cell where the top-left corner of the shape resides.
This anchor cell, along with the bottomRightCornerCell, determines where the shape will be positioned on the worksheet. In addition, the bottomRightCornerPosition and topLeftCornerPosition properties allow for finer control of the shape's position.
The cell where the top-left corner of the shape resides.ArgumentException The value assigned is a cell whose worksheet is not the same as this shape's worksheet.
ArgumentNullException The value assigned is null and this shape already exists on a worksheet or group.
Gets or sets the position in the topLeftCornerCell of the shape's top-left corner, expressed in percentages.
These percentages are expressed as distance across the associated dimension of the cell, starting at the top-left corner of the cell. For example, (0.0, 0.0) represents the top-left corner of the cell, whereas (100.0, 100.0) represents the bottom-right corner of the cell. (50.0, 10.0) would represent the location in the cell which is centered horizontally, and a tenth of the way down from the top.
The position in the top-left corner cell of the shape's top-left corner.ArgumentOutOfRangeException Either coordinate of the value assigned is outside the range of 0.0 to 100.0.
Returns or sets a UpDownBars instance which determines the appearance for a stock chart's up/down bars.
This property is only applicable for stock charts.
Up/down bars depict gains or losses across a series for a stock chart.
Returns or sets a boolean value indicating whether the fill colors
for
This property defaults to true, causing fill colors for series and data points to be automatically selected by Excel.
The automatically selected color can always be overridden for individual series and/or data points using the Series.fill, Series.line, and DataPoint.fill properties.
In cases where VaryColors is set to true, but a fill is explicitly assigned, the assigned fill is used for the associated series or data point, while series or data points which have no explicitly assigned fill will have a fill color automatically selected.
Gets or sets the value indicating whether the shape is visible on the worksheet. The value indicating whether the shape is visible on the worksheet.
Returns a Wall object which represents the back and side walls, and floor of the chart. Applicable only for 3-D charts.
Use this property to apply the same settings for the back wall, side wall, and floor.
Use the backWall property to control the appearance of the back wall.
Use the sideWall property to control the appearance of the side wall.
Use the floor property to control the appearance of the bottom wall.
The BackWall, SideWall, and Floor properties take precedence over this property.
Indexer
The corresponding axis or null if not in the collection.
Returns the axis collection (read-only)
Clears the cached unknown shape data which was read in from a parsed excel file.
This method will only be needed until all shape information is supported and customizable. After all shape data can be controlled, this method will become obsolete. Currently, all unsupported data will be stored with the shape for round-tripping purposes. For example, if an Excel file with complex and unsupported shapes is loaded into a Workbook instance, some cell values are changed, and it is saved to the same file, the complex shapes will still exist in the workbook. However, if a loaded shape needs to be modified before it is saved back, this method allows for that unsupported data to be removed while all supported data is maintained.
Note: This method only clears unsupported data. In future versions of the product, as more shape data is supported, this method will have different effects on the shape, until eventually all data is supported and this method will have no effect on the shape.
InvalidOperationException This method is called on an UnknownShape instance.
Returns the ComboChartGroup instance associated with the specified 'chartType' and 'axisGroup', or null if no such instance exists.
A new or existing ComboChartGroup instance.
A ChartType constant which identifies the combo chart group.
An AxisGroup constant which identifies the combo chart group.
Returns a collection of the ComboChartGroup instances associated with this chart.
The properties of the WorksheetChart class which apply only to a specific chart type are not applicable for combo charts. For example, the gapWidth property, which applies to bar charts, is not used for bar charts which appear within a combo chart. The reason for this is that combo charts support multiple occurrences of the same chart type, making the WorksheetChart-level properties ambiguous in the context of a combo chart.
This class makes it possible to set chart-specific properties for one or more occurrences of a particular chart type, for a particular axis group.
For example, consider a combo chart with two ClusteredColumn series, one on the primary axis and another on the secondary. To set the gapWidth property for the chart on the primary axis, add an item to this collection with a chartType of ClusteredColumn, and an AxisGroup of Primary. On the ComboChartGroup instance returned from the collection's Add method, set the GapWidth property to the desired value.
When the chart is serialized, this collection is checked against each series in the combo chart.
If the
Gets the bounds of the shape in twips (1/20th of a point).
The bounds returned by this method are only valid with the current configuration of the worksheet. If any rows or columns before or within the shape are resized, these bounds will no longer reflect the position of the shape.
InvalidOperationException The topLeftCornerCell or bottomRightCornerCell are null, in which case the shape has no bounds.
The bounds of the shape on its worksheet.
Gets the bounds of the shape in twips (1/20th of a point).
The bounds returned by this method are only valid with the current configuration of the worksheet. If any rows or columns before or within the shape are resized, these bounds will no longer reflect the position of the shape.
InvalidOperationException The topLeftCornerCell or bottomRightCornerCell are null, in which case the shape has no bounds.
The bounds of the shape on its worksheet.
The options to use when getting the bounds of the shape.
Indexer
A zero based index
Returns the series collection (read-only)
Sets the bounds of the shape in twips (1/20th of a point).
The shape will only be positioned at the specified bounds while the worksheet remains in the current configuration. Depending on the positioningMode of the shape, it may change bounds if any rows or columns before or within the shape are resized.
ArgumentNullException 'sheet' is null.
The worksheet on which the shape should be placed.
The new bounds where the shape should be placed.
Sets the bounds of the shape in twips (1/20th of a point).
The shape will only be positioned at the specified bounds while the worksheet remains in the current configuration. Depending on the positioningMode of the shape, it may change bounds if any rows or columns before or within the shape are resized.
ArgumentNullException s
'sheet' is null.
The sheet on which the shape should be placed.
The new bounds where the shape should be placed.
The options to use when setting the bounds of the shape.
Sets the source data range for a combo chart.
Combo charts support multiple chart types within the main chart, with each different chart type being associated with one or more 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 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.
BaseError The current value of the chartType property is not Combo.
NotSupportedException The specified 'seriesChartTypes' array contains one or more values which are not supported within a combo chart.
NotSupportedException The specified 'seriesChartTypes' array contains a combination of values which would require more than the maximum allowable number of axes (two).
The data range for the combo chart
An array of chartType constants which specify the chart type for each series yielded from the specified 'dataRange'.
Optional. True to plot by rows where each row is a separate series or false to plot by columns where each column is a separate series. The default is false.
Optional. Determines how to parse the dataRange.
Sets the source data range for the chart.
For combo charts, this method always displays the first series in a clustered column chart, with all subsequent series displayed in line charts. Use the setComboChartSourceData to customize the series charts for a combo chart.
The data range for the chart
Optional. True to plot by rows where each row is a separate series or false to plot by columns where each column is a separate series. The default is false.
Optional. Determines how to parse the dataRange.
Gets the shape at the specified index in the collection. The shape at the specified index.
ArgumentOutOfRangeException 'index' is less than zero or 'index' is greater than or equal to count.
The zero-based index of the shape to get.
Gets the collection of shapes contained in the group. The collection of shapes contained in the group.
Static
compareStatic
compareStatic
createCreates a shape which is predefined in Microsoft Excel.
InvalidEnumArgumentException 'shapeType' is not defined in the PredefinedShapeType enumeration.
A WorksheetShape-derived instance representing the predefined shape.
The type of shape to create.
Static
equalsStatic
equalsStatic
getStatic
getStatic
getStatic
referenceStatic
static
Represents a group of shapes in a worksheet. This group is also a shape which can be positioned and contained within another group or on a worksheet.