Chart

Overview

Chart is a class in Aspose.Cells FOSS for TypeScript.

This class declares 7 methods for Chart objects in TypeScript programs. Available methods include: constructor, setDataRange, setLegendPosition, setPosition, setPositionWithOffset, setTitle, setWorksheet. 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.

Properties

NameTypeAccessDescription
chartType: ChartTypeRead/WriteGets or sets the chart type.
title: stringRead/WriteGets or sets the title.
series: ChartSeries[]Read/WriteGets or sets the series.
legendPosition: "left" | "right" | "top" | "bottom"Read/WriteGets or sets the legend position.
categoryAxisPosition: "left" | "right" | "top" | "bottom"Read/WriteGets or sets the category axis position.
valueAxisPosition: "left" | "right" | "top" | "bottom"Read/WriteGets or sets the value axis position.
plotArea: { x: number; y: number; width: number; height: number }Read/WriteGets or sets the plot area.
fromRow: numberRead/WriteGets or sets the from row.
fromCol: numberRead/WriteGets or sets the from col.
toRow: numberRead/WriteGets or sets the to row.
toCol: numberRead/WriteGets or sets the to col.
fromRowOff: numberRead/WriteGets or sets the from row off.
fromColOff: numberRead/WriteGets or sets the from col off.
toRowOff: numberRead/WriteGets or sets the to row off.
toColOff: numberRead/WriteGets or sets the to col off.
originalX: numberRead/WriteGets or sets the original x.
originalY: numberRead/WriteGets or sets the original y.
sheetIndex: numberRead/WriteGets or sets the sheet index.
type: stringRead/WriteGets or sets the type.
name: stringRead/WriteGets or sets the name.
originalChartXml: stringRead/WriteGets or sets the original chart xml.
originalStyleXml: stringRead/WriteGets or sets the original style xml.
originalColorsXml: stringRead/WriteGets or sets the original colors xml.
x: numberRead/WriteGets or sets the x.
y: numberRead/WriteGets or sets the y.
width: numberRead/WriteGets or sets the width.
height: numberRead/WriteGets or sets the height.
dataRange: stringRead/WriteGets or sets the data range.
dataIsVertical: booleanRead/WriteGets or sets the data is vertical.

Methods

SignatureDescription
constructor(type: ChartType, sheetIndex: number)Calls constructor(type, sheetIndex) on this Chart instance.
setPosition(topRow: number, leftColumn: number, bottomRow: number, rightColumn: number)ChartSets the position value.
setPositionWithOffset(topRow: number, top: number, leftColumn: number, left: number, height: number, width: number)ChartSets the position with offset value.
setDataRange(dataRange: string, isVertical: boolean)ChartSets the data range value.
setWorksheet(worksheet: Worksheet)Sets the worksheet value.
setTitle(title: string)ChartSets the title value.
setLegendPosition(position: "left" | "right" | "top" | "bottom")ChartSets the legend position value.

See Also

 English