Chart Class
Represents a chart.
public sealed class Chart : DrawingElement
Public NotInheritable Class Chart
Inherits DrawingElement
- Inheritance:
- System.ObjectChart
Remarks
Chart is a DrawingElement that represents data in graphical form.
In order to create, edit, or export charts, the GemBox.Spreadsheet library needs to be loaded. Without it, charts will be preserved instead of being loaded into the DocumentModel.
For more information, see charts example.
Constructors
Chart(DocumentModel, ChartType)
Initializes a new instance of the Chart class with specified data.
public Chart(DocumentModel document, ChartType chartType)
Public Sub New(document As DocumentModel, chartType As ChartType)
Parameters
document
- DocumentModel
The owner document.
chartType
- ChartType
Type of the chart.
Chart(DocumentModel, ChartType, ChartGrouping)
Initializes a new instance of the Chart class with specified data.
public Chart(DocumentModel document, ChartType chartType, ChartGrouping chartGrouping)
Public Sub New(document As DocumentModel, chartType As ChartType, chartGrouping As ChartGrouping)
Parameters
document
- DocumentModel
The owner document.
chartType
- ChartType
Type of the chart.
chartGrouping
- ChartGrouping
The chart's series grouping (clustered, stacked or 100% stacked).
Chart(DocumentModel, ChartType, ChartGrouping, Layout)
Initializes a new instance of the Chart class with specified data and layout.
public Chart(DocumentModel document, ChartType chartType, ChartGrouping chartGrouping, Layout layout)
Public Sub New(document As DocumentModel, chartType As ChartType, chartGrouping As ChartGrouping, layout As Layout)
Parameters
document
- DocumentModel
The owner document.
chartType
- ChartType
Type of the chart.
chartGrouping
- ChartGrouping
The chart's series grouping (clustered, stacked or 100% stacked).
layout
- Layout
The chart layout (position and size).
Chart(DocumentModel, ChartType, Layout)
Initializes a new instance of the Chart class with specified data and layout.
public Chart(DocumentModel document, ChartType chartType, Layout layout)
Public Sub New(document As DocumentModel, chartType As ChartType, layout As Layout)
Parameters
document
- DocumentModel
The owner document.
chartType
- ChartType
Type of the chart.
layout
- Layout
The chart layout (position and size).
Properties
ChartType
Property Value
ElementType
public override ElementType ElementType { get; }
Public Overrides ReadOnly Property ElementType As ElementType
Property Value
The Chart value.
Overrides
ExcelChart
Gets the actual chart as an instance of GemBox.Spreadsheet.Charts.ExcelChart.
Property Value
- System.Object
The actual chart as an instance of GemBox.Spreadsheet.Charts.ExcelChart.
Methods
Clone()
Clones this Chart instance.
Returns
Inherited Properties
CharacterFormat | Gets or sets the character format. (Inherited from DrawingElement) |
Content | Gets the content of the current Element. (Inherited from Element) |
Document | Gets the owner document. (Inherited from Element) |
Hidden | Gets or sets a value indicating whether this DrawingElement is hidden. Default value is false. (Inherited from DrawingElement) |
Layout | Gets or sets the DrawingElement layout (position and size). (Inherited from DrawingElement) |
Metadata | Gets the metadata (non-visual properties) of this DrawingElement instance. (Inherited from DrawingElement) |
Parent | Gets the parent of this Element instance. (Inherited from Element) |
ParentCollection | Gets the InlineCollection that contains this Inline instance. (Inherited from Inline) |
Revision | Gets or sets the revision information for the inline. (Inherited from Inline) |
Inherited Methods
Clone(System.Boolean) | Clones this DrawingElement instance. (Inherited from DrawingElement) |
FormatDrawing() | Formats this DrawingElement to its default size so it can be exported to PDF, XPS, image or be printed. (Inherited from DrawingElement) |
FormatDrawing(System.Double, System.Double, LengthUnit) | Formats this DrawingElement to specified size so it can be exported to PDF, XPS, image or be printed. (Inherited from DrawingElement) |
FormatDrawing(System.Double, System.Double, LengthUnit, PaginatorOptions) | Formats this DrawingElement to specified size so it can be exported to PDF, XPS, image or be printed. (Inherited from DrawingElement) |
FormatDrawing(PaginatorOptions) | Formats this DrawingElement to its default size so it can be exported to PDF, XPS, image or be printed. (Inherited from DrawingElement) |
GetChildElements(System.Boolean) | Gets the child elements. (Inherited from Element) |
GetChildElements(System.Boolean, ElementType[]) | Gets the child elements filtered by ElementType. (Inherited from Element) |
GetParentElements() | Gets the parent elements. (Inherited from Element) |
GetParentElements(ElementType[]) | Gets the parent elements. (Inherited from Element) |