Chart

Chart class

Represents an graphic chart on a slide.

public class Chart : GraphicalObject, IChart

Properties

NameDescription
AlternativeText { get; set; }Returns or sets the alternative text associated with a shape. Read/write String.
AlternativeTextTitle { get; set; }Returns or sets the title of alternative text associated with a shape. Read/write String.
AsIFormattedTextContainer { get; }Allows to get base IFormattedTextContainer interface. Read-only IFormattedTextContainer.
AsIThemeable { get; }Allows to get base IThemeable interface. Read-only IThemeable.
Axes { get; }Provide access to chart axes. Read-only IAxesManager.
BackWall { get; }Returns an object which allows to change format of the back wall of a 3D chart. Read-only IChartWall.
BlackWhiteMode { get; set; }Property specifies how a shape will render in black-and-white display mode.. Read/write BlackWhiteMode.
ChartData { get; }Returns information about the linked or embedded data associated with a chart. Read-only IChartData.
ChartDataTable { get; }Returns a data table of a chart. Read-only IDataTable.
ChartTitle { get; }Returns or sets a chart title. Read-only IChartTitle.
ConnectionSiteCount { get; }Returns the number of connection sites on the shape. Read-only Int32.
CustomData { get; }Returns the shape’s custom data. Read-only ICustomData.
DisplayBlanksAs { get; set; }Returns or sets the way to plot blank cells on a chart. Read/write DisplayBlanksAsType.
virtual EffectFormat { get; }Returns the EffectFormat object which contains pixel effects applied to a shape. Note: can return null for certain types of shapes which don’t have effect properties. Read-only IEffectFormat.
virtual FillFormat { get; }Returns the FillFormat object that contains fill formatting properties for a shape. Note: can return null for certain types of shapes which don’t have fill properties. Read-only IFillFormat.
Floor { get; }Returns an object which allows to change format of the floor of a 3D chart. Read-only IChartWall.
Frame { get; set; }Returns or sets the shape frame’s properties. Read/write IShapeFrame.
GraphicalObjectLock { get; }Returns shape’s locks. Read-only IGraphicalObjectLock.
HasDataTable { get; set; }Determines whether a chart has a data table. Read/write Boolean.
HasLegend { get; set; }Determines whether a chart has a legend. Read/write Boolean.
HasRoundedCorners { get; set; }Specifies the chart area shall have rounded corners. Read/write Boolean.
HasTitle { get; set; }Determines whether a chart has a visible title. Read/write Boolean.
Height { get; set; }Returns or sets the height of the shape. Read/write Single.
Hidden { get; set; }Determines whether the shape is hidden. Read/write Boolean.
HyperlinkClick { get; set; }Returns or sets the hyperlink defined for mouse click. Read/write IHyperlink.
HyperlinkManager { get; }Returns the hyperlink manager. Read-only IHyperlinkManager.
HyperlinkMouseOver { get; set; }Returns or sets the hyperlink defined for mouse over. Read/write IHyperlink.
IsDecorative { get; set; }Gets or sets ‘Mark as decorative’ option Reed/write Boolean.
IsGrouped { get; }Determines whether the shape is grouped. Read-only Boolean.
IsTextHolder { get; }Determines whether the shape is TextHolder_PPT. Read-only Boolean.
Legend { get; }Returns or sets a legend for a chart. Read-only ILegend.
virtual LineFormat { get; }Returns the LineFormat object that contains line formatting properties for a shape. Note: can return null for certain types of shapes which don’t have line properties. Read-only ILineFormat.
Name { get; set; }Returns or sets the name of a shape. Must be not null. Use empty string value if needed. Read/write String.
OfficeInteropShapeId { get; }Gets unique shape identifier in slide scope. Read-only UInt32. See also UniqueId for getting unique shape identifier in presentation scope.
ParentGroup { get; }Returns parent GroupShape object if shape is grouped. Otherwise returns null. Read-only IGroupShape.
Placeholder { get; }Returns the placeholder for a shape. Returns null if the shape has no placeholder. Read-only IPlaceholder.
PlotArea { get; }Represents the plot area of a chart. Read-only IChartPlotArea.
PlotVisibleCellsOnly { get; set; }Determines whether the only visible cells are plotted. False to plot both visible and hidden cells. Read/write Boolean.
Presentation { get; }Returns the parent presentation of a slide. Read-only IPresentation.
RawFrame { get; set; }Returns or sets the raw shape frame’s properties. Read/write IShapeFrame.
Rotation { get; set; }Returns or sets the number of degrees the specified shape is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation. Read/write Single.
Rotation3D { get; }Returns a 3D rotation of a chart. Read-only IRotation3D.
ShapeLock { get; }Returns shape’s locks. Read-only IGraphicalObjectLock. (2 properties)
ShowDataLabelsOverMaximum { get; set; }Specifies data labels over the maximum of the chart shall be shown. Read/write Boolean.
SideWall { get; }Returns an object which allows to change format of the side wall of a 3D chart. Read-only IChartWall.
Slide { get; }Returns the parent slide of a shape. Read-only IBaseSlide.
Style { get; set; }Returns or sets the chart style. Read/write StyleType.
TextFormat { get; }Returns chart text format. The property is not applicable for the following types: Treemap, Sunburst, Waterfall, Histogram, Funnel,BoxAndWhisker. Read-only IChartTextFormat.
ThemeManager { get; }Returns theme manager. Read-only IOverrideThemeManager.
virtual ThreeDFormat { get; }Returns the ThreeDFormat object that 3d effect properties for a shape. Note: can return null for certain types of shapes which don’t have 3d properties. Read-only IThreeDFormat.
Type { get; set; }Returns or sets the chart type. Read/write ChartType.
UniqueId { get; }Gets unique shape identifier in presentation scope. Read-only UInt32. See also OfficeInteropShapeId for getting unique shape identifier in slide scope.
UserShapes { get; }Specify the shapes drawn on top of the chart. Read-only IGroupShape.
Width { get; set; }Returns or sets the width of the shape. Read/write Single.
X { get; set; }Returns or sets the x-coordinate of the upper-left corner of the shape. Read/write Single.
Y { get; set; }Returns or sets the y-coordinate of the upper-left corner of the shape. Read/write Single.
virtual ZOrderPosition { get; }Returns the position of a shape in the z-order. Shapes[0] returns the shape at the back of the z-order, and Shapes[Shapes.Count - 1] returns the shape at the front of the z-order. Read-only Int32.

Methods

NameDescription
AddPlaceholder(IPlaceholder)Adds a new placeholder if there is no and sets placeholder properties to a specified one.
CreateThemeEffective()Returns an effective theme for this chart.
GetBasePlaceholder()Returns a basic placeholder shape (shape from the layout and/or master slide that the current shape is inherited from). A null is returned if the current shape is not inherited.
GetImage()Returns shape thumbnail. ShapeThumbnailBounds.Shape shape thumbnail bounds type is used by default.
GetImage(ShapeThumbnailBounds, float, float)Returns shape thumbnail.
RemovePlaceholder()Defines that this shape isn’t a placeholder.
ValidateChartLayout()Calculates actual values of chart elements. The actual values include position of elements that implement IActualLayout interface (IActualLayout.ActualX, IActualLayout.ActualY, IActualLayout.ActualWidth, IActualLayout.ActualHeight) and actual axes values (IAxis.ActualMaxValue, IAxis.ActualMinValue, IAxis.ActualMajorUnit, IAxis.ActualMinorUnit, IAxis.ActualMajorUnitScale, IAxis.ActualMinorUnitScale)
WriteAsSvg(Stream)Saves content of Shape as SVG file.
WriteAsSvg(Stream, ISVGOptions)Saves content of Shape as SVG file.

See Also