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

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

Methods

SignatureDescription
constructor(type: ChartType, sheetIndex: number)
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