Click or drag to resize

XlsChartShape Properties

The XlsChartShape type exposes the following members.

Properties
Name Description
Public property AlternativeText
Returns or sets the descriptive (alternative) text string for a Shape object when the object is saved to a Web page. Read/write String
(Inherited from XlsShape .)
Public property AlternativeTextTitle
Returns or sets the descriptive (alternative) text title string for a Shape object when the object is saved to a Web page. Read/write String
(Inherited from XlsShape .)
Public property AutoScaling
True if Microsoft Excel scales a 3-D chart so that it's closer in size to the equivalent 2-D chart.
Public property AutoSize
True if the size of the specified object is changed automatically to fit text within its boundaries.
(Inherited from XlsShape .)
Public property BottomRow
Bottom row of the chart in the worksheet.
Public property BottomRowOffset
Bottom row offset.
(Inherited from XlsShape .)
Public property CategoryAxisTitle
Title of the category axis.
Public property ChartArea
Returns an object that represents the complete chart area for the chart. Read-only.
Public property ChartSubTitle
Gets the chart's sub-title. Only for ODS format file.
Public property ChartTitle
Represents the title of the specified chart.
Public property ChartTitleArea
Gets title text area. Read-only.
Public property ChartType
Type of the chart.
Public property CheckBoxes
Returns collection with all checkboxes inside this worksheet. Read-only.
Public property CodeName
Gets code name of the chart.
Public property ComboBoxes
Returns collection with all comboboxes inside this worksheet. Read-only.
Public property DataRange
DataRange for the chart series.
Public property DataTable
Represents charts dataTable object.
Public property DepthPercent
Returns or sets the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent).
Public property DisplayAxisFieldButtons
Gets or sets a value indicating whether [show axis field buttons].
Public property DisplayBlanksAs
Represents the way that blank cells are plotted on a chart.
Public property DisplayEntireFieldButtons
Gets or sets a value indicating whether [show all field buttons].
Public property DisplayLegendFieldButtons
Gets or sets a value indicating whether [show legend field buttons].
Public property DisplayValueFieldButtons
Gets or sets a value indicating whether [show value field buttons].
Public property Code example Elevation
Returns or sets the elevation of the 3-D chart view, in degrees (?0 to +90 degrees).
Examples
The following code illustrates how to set Rotation for 3-D charts:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Add data</para><para>worksheet.Range["A1"].Text = "Jan";
 worksheet.Range["B1"].Text = "Feb";
 worksheet.Range["C1"].Text = "Mar";
 worksheet.Range["A2"].Text = "10";
 worksheet.Range["B2"].Text = "20";
 worksheet.Range["C2"].Text = "30";</para><para>//Create chart and range</para><para>Chart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["A1:C2"];</para><para>//Set Chart elevation</para><para>chart.ChartType = ExcelChartType.Column3DClustered;</para><para>chart.Elevation = 50;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
Public property Fill
Represents fill properties.
(Inherited from XlsShape .)
Public property Floor
Represents chart floor. Read-only.
Public property GapDepth
Returns or sets the distance between the data series in a 3-D chart, as a percentage of the marker width.( 0 - 500 )
Public property Glow
Gets the glow properties.
(Inherited from XlsShape .)
Public property HasChartArea
Indicates whether chart has chart area.
Public property HasChartTitle
Indicates wheather the chart has title
Public property Code example HasDataTable
True if the chart has a data table.
Examples
The following code illustrates how data table can be set for charts:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Add data</para><para>worksheet.Range["A1"].Text = "Jan";
 worksheet.Range["B1"].Text = "Feb";
 worksheet.Range["C1"].Text = "Mar";
 worksheet.Range["A2"].Text = "10";
 worksheet.Range["B2"].Text = "20";
 worksheet.Range["C2"].Text = "30";</para><para>//Create chart and range</para><para>Chart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["A1:C2"];</para><para>//Set Chart data table</para><para>chart.HasDataTable = true;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
Public property HasFill
Indicates whether XlsFill item was created. Read-only.
(Inherited from XlsShape .)
Public property HasFloor
Gets value indicating whether floor object was created.
Public property Code example HasLegend
True if the chart has a legend object.
Examples
The following code illustrates how to set HasLegend property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Add data</para><para>worksheet.Range["A1"].Text = "Jan";
 worksheet.Range["B1"].Text = "Feb";
 worksheet.Range["C1"].Text = "Mar";
 worksheet.Range["A2"].Text = "10";
 worksheet.Range["B2"].Text = "20";
 worksheet.Range["C2"].Text = "30";</para><para>//Create chart and range</para><para>Chart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["A1:C2"];</para><para>//Set hasLegend</para><para>chart.HasLegend = false;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
Public property HasLineFormat
Indicates whether line item was created. Read-only.
(Inherited from XlsShape .)
Public property HasPivotTable
Indicates whether contains pivot table.
Public property HasPlotArea
Indicates whether chart has plot area.
Public property HasWalls
Gets value indicating whether floor object was created.
Public property Height
Height of object.
(Inherited from XlsShape .)
Public property HeightPercent
Returns or sets the height of a 3-D chart as a percentage of the chart width (between 5 and 500 percent).
Public property HtmlString
Gets and sets the html string which contains data and some formattings in this shape.
(Inherited from XlsShape .)
Public property ID
ID of object.
(Inherited from XlsShape .)
Public property Instance Obsolete.
Returns instance value. Read-only.
(Inherited from XlsShape .)
Public property IsFlipH
Returns or sets if the shape flips Horizontal.false is default;
(Inherited from XlsShape .)
Public property IsFlipV
Returns or sets if the shape flips Vertical.false is default;
(Inherited from XlsShape .)
Public property IsGroup
This shape is group shape.
(Inherited from XlsShape .)
Public property IsInGroup
This shape is child shape of group shape.
(Inherited from XlsShape .)
Public property IsLockAspectRatio
True means that don't allow changes in aspect ratio.
(Inherited from XlsShape .)
Public property IsLocked
Gets or sets a value indicating whether the shape is locked.
(Inherited from XlsShape .)
Protected property IsMoveWithCell
Determines whether the object moves with the cell it is associated with.
(Inherited from XlsShape .)
Public property IsPrintable
Gets or sets a value indicating whether the shape is printable.
(Inherited from XlsShape .)
Public property IsRelative
Gets or sets a value indicating whether the shape is relative.
(Inherited from XlsShape .)
Public property IsRelativeResize
True means that is relative to original size of picture.
(Inherited from XlsShape .)
Public property IsRightToLeft
Indicates whether chart is displayed right to left.
Public property IsShortVersion Obsolete.
Indiicates whether it is short version of the shape (without obj and maybe some other properties).
(Inherited from XlsShape .)
Protected property IsSizeWithCell
Determines whether the size is calculated based on the cell dimensions.
(Inherited from XlsShape .)
Public property IsSmartArt
Determines whether the shape is a SmartArt graphic based on the presence of a linked drawing.
(Inherited from XlsShape .)
Public property Left
X of object
(Inherited from XlsShape .)
Public property LeftColumn
Left column of the chart in the worksheet.
Public property LeftColumnOffset
Left column offset. 1024 means whole column offset
(Inherited from XlsShape .)
Public property Legend
Represents chart legend.
Public property Line
Represents line format properties. Read only.
(Inherited from XlsShape .)
Public property LinkedCell
Gets or sets the linked cell for the shape.
(Inherited from XlsShape .)
Public property Name
Name of object.
(Inherited from XlsShape .)
Public property OnAction
Gets or sets macro-command that is called when action happens.
(Inherited from XlsShape .)
Public property PageSetup
Page setup for the chart. Read-only.
Public property Parent
Reference to Parent object. Read-only.
(Inherited from XlsObject .)
Public property Code example Perspective
Returns or sets the perspective for the 3-D chart view (0 to 100).
Examples
The following code illustrates how to set Perspective for the charts:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Add data</para><para>worksheet.Range["A1"].Text = "Jan";
 worksheet.Range["B1"].Text = "Feb";
 worksheet.Range["C1"].Text = "Mar";
 worksheet.Range["A2"].Text = "10";
 worksheet.Range["B2"].Text = "20";
 worksheet.Range["C2"].Text = "30";</para><para>//Create chart and range</para><para>Chart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["A1:C2"];</para><para>//Set Chart perspective</para><para>chart.ChartType = ExcelChartType.Column3DClustered;</para><para>chart.Perspective = 70;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
Public property PivotChartType
Gets or sets the type of the pivot chart.
Public property PivotTable
Gets or sets the pivot source.
Public property PlotArea
Returns plot area frame format. Read-only.
Public property PlotVisibleOnly
True if only visible cells are plotted. False if both visible and hidden cells are plotted.
Public property PrimaryCategoryAxis
Primary category axis. Read-only.
Public property PrimaryFormats
Returns chart format collection in primary axis.
Public property PrimarySerieAxis
Primary serie axis. Read-only.
Public property PrimaryValueAxis
Primary value axis. Read-only.
Protected property ReferenceCount
Get quantity of instance references.
(Inherited from XlsObject .)
Public property Reflection
Gets the reflection effect applied to the shape.
(Inherited from XlsShape .)
Public property ResizeBehave
Specifies all possible settings for how drawing object shall be resized when the rows and columns between its start and ending anchor are resized or inserted(ComboBoxShape and CheckBoxShape and RadioButtonShape set MoveAndResize type value is invalid)
(Inherited from XlsShape .)
Public property RichText
Gets the rich text string associated with the current object. If the rich text string has not been initialized, it creates a new instance of RichTextShape.
(Inherited from XlsShape .)
Public property RightAngleAxes
True if the chart axes are at right angles, independent of chart rotation or elevation.
Public property RightColumn
Right column of the chart in the worksheet.
Public property RightColumnOffset
Right column offset.
(Inherited from XlsShape .)
Public property Code example Rotation
Returns or sets the rotation of the 3-D chart view (the rotation of the plot area around the z-axis, in degrees).(0 to 360 degrees).
Examples
The following code illustrates how to set Rotation for 3-D charts:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Add data</para><para>worksheet.Range["A1"].Text = "Jan";
 worksheet.Range["B1"].Text = "Feb";
 worksheet.Range["C1"].Text = "Mar";
 worksheet.Range["A2"].Text = "10";
 worksheet.Range["B2"].Text = "20";
 worksheet.Range["C2"].Text = "30";</para><para>//Create chart and range</para><para>Chart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["A1:C2"];</para><para>//Set Chart rotation</para><para>chart.ChartType = ExcelChartType.Column3DClustered;</para><para>chart.Rotation = 50;</para><para>//Save to file</para><para>workbook.SaveToFile("Chart.xlsx");</para>
Public property SecondaryCategoryAxis
Secondary category axis. Read-only.
Public property SecondaryCategoryAxisTitle
Title of the secondary category axis.
Public property SecondaryFormats
Returns chart format collection in secondary axis.
Public property SecondaryValueAxis
Secondary value axis. Read-only.
Public property SecondaryValueAxisTitle
Title of the secondary value axis.
Public property SeriesAxisTitle
Title of the series axis.
Public property SeriesDataFromRange
True if series are in rows in DataRange; False otherwise.
Public property Shadow
Gets the shadow properties.
(Inherited from XlsShape .)
Public property ShapeCount Obsolete.
Returns number of shapes contained by this shape (1 means no sub shapes). Read-only.
(Inherited from XlsShape .)
Public property ShapeId
Gets / sets shape id.
(Inherited from XlsShape .)
Public property Shapes
Returns chart shapes.
Public property ShapeType
Type of shape , Read Only.
(Inherited from XlsShape .)
Public property ShowReportFilterFieldButtons
Gets or sets a value indicating whether [show report filter field buttons].
Public property SizeWithWindow
True if Microsoft Excel resizes the chart to match the size of the chart sheet window. False if the chart size isn't attached to the window size. Applies only to chart sheets.
Public property SupportWallsAndFloor
Indicates whether this chart supports walls and floor. Read-only.
Public property TextBoxes
Returns collection with all textboxes inside this worksheet. Read-only.
Public property TextFrame
Gets the text frame associated with the shape.
(Inherited from XlsShape .)
Public property TextVerticalAlignment
Get or set Text Vertical Alignment in shape.
(Inherited from XlsShape .)
Public property ThreeD
Gets the chart3 D properties.
(Inherited from XlsShape .)
Public property Top
Top of object.
(Inherited from XlsShape .)
Public property TopRow
Top row of the chart in the worksheet.
Public property TopRowOffset
Top row offset.256 means whole row offset
(Inherited from XlsShape .)
Public property UpdatePositions
Indicates whether we have to update absolute positions after setting TopRow, BottomRow, LeftColumn, RightColumn.
(Inherited from XlsShape .)
Public property ValueAxisTitle
Title of the value axis.
Public property Visible
Gets or sets the visibility of the shape. When set to true, the shape is visible; when set to false, the shape is hidden.
(Inherited from XlsShape .)
Public property VmlShape
Indicates whether this is vml shape or not.
(Inherited from XlsShape .)
Public property Walls
Represents chart walls. Read-only.
Public property WallsAndGridlines2D
True if gridlines are drawn two-dimensionally on a 3-D chart.
Public property Width
Width of object.
(Inherited from XlsShape .)
Public property XPos
X coordinate of the upper-left corner of the chart in points (1/72 inch).
Public property YPos
Y coordinate of the upper-left corner of the chart in points (1/72 inch).
Top
See Also