Chart
Overview
Chart is a class in Aspose.Cells FOSS for Typescript.
Chart.setPositionWithOffset lets you position a chart using absolute pixel offsets and explicit height and width values.
This class provides 7 methods for working with Chart objects in Typescript programs.
Available methods include: constructor, setDataRange, setLegendPosition, setPosition, setPositionWithOffset, setTitle, setWorksheet.
All public members are accessible to any Typescript application after installing the Aspose.Cells FOSS for Typescript package.
Properties: categoryAxisPosition, chartType, dataIsVertical, dataRange, fromCol, fromColOff, and 23 more.
Description
Chart is a class in the Aspose.Cells FOSS library for TypeScript that exposes 6 methods and 33 properties for programmatic use.
Core capabilities include: : charttype; : string; : chartseries[]. These operations enable developers to integrate chart functionality directly into TypeScript applications.
The class also provides the chartType property (gets the chart type), the title property (gets the title), the series property (gets the series).
Instances are created through a single constructor that initializes the object with default values.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
chartType | : ChartType | Read | Gets the chart type. |
title | : string | Read | Gets the title. |
series | : ChartSeries[] | Read | Gets the series. |
legendPosition | : "left" | "right" | "top" | "bottom" | Read | Gets the legend position. |
categoryAxisPosition | : "left" | "right" | "top" | "bottom" | Read | Gets the category axis position. |
valueAxisPosition | : "left" | "right" | "top" | "bottom" | Read | Gets the value axis position. |
plotArea | : { x: number; y: number; width: number; height: number } | Read | Gets the plot area. |
x | : number | Read | Gets the x. |
y | : number | Read | Gets the y. |
width | : number | Read | Gets the width. |
height | : number | Read | Gets the height. |
fromRow | : number | Read | Gets the from row. |
fromCol | : number | Read | Gets the from col. |
toRow | : number | Read | Gets the to row. |
toCol | : number | Read | Gets the to col. |
fromRowOff | : number | Read | Gets the from row off. |
fromColOff | : number | Read | Gets the from col off. |
toRowOff | : number | Read | Gets the to row off. |
toColOff | : number | Read | Gets the to col off. |
originalX | : number | Read | Gets the original x. |
originalY | : number | Read | Gets the original y. |
sheetIndex | : number | Read | Gets the sheet index. |
type | : string | Read | Gets the type. |
name | : string | Read | Gets the name. |
originalChartXml | : string | Read | Gets the original chart xml. |
originalStyleXml | : string | Read | Gets the original style xml. |
originalColorsXml | : string | Read | Gets the original colors xml. |
x | : number | Read | Gets the x. |
y | : number | Read | Gets the y. |
width | : number | Read | Gets the width. |
height | : number | Read | Gets the height. |
dataRange | : string | Read | Gets the data range. |
dataIsVertical | : boolean | Read | Gets the data is vertical. |
Methods
| Signature | Description |
|---|---|
constructor(type: ChartType, sheetIndex: number) | |
setPosition(topRow: number, leftColumn: number, bottomRow: number, rightColumn: number) → Chart | Sets the position value. |
setPositionWithOffset(topRow: number, top: number, leftColumn: number, left: number, height: number, width: number) → Chart | Sets the position with offset value. |
setDataRange(dataRange: string, isVertical: boolean) → Chart | Sets the data range value. |
setWorksheet(worksheet: Worksheet) | Sets the worksheet value. |
setTitle(title: string) → Chart | Sets the title value. |
setLegendPosition(position: "left" | "right" | "top" | "bottom") → Chart | Sets the legend position value. |