Sparkline

Sparkline class

A sparkline represents a tiny chart or graphic in a worksheet cell that provides a visual representation of data.

class Sparkline;

Properties

PropertyTypeDescription
dataRangestringRepresents the data range of the sparkline.
rownumberReadonly. Gets the row index of the sparkline.
columnnumberReadonly. Gets the column index of the sparkline.

Methods

MethodDescription
toImage(string, ImageOrPrintOptions)Converts a sparkline to an image.
toImage(ImageOrPrintOptions)Converts a sparkline to an image.

dataRange

Represents the data range of the sparkline.

dataRange : string;

row

Readonly. Gets the row index of the sparkline.

row : number;

column

Readonly. Gets the column index of the sparkline.

column : number;

toImage(string, ImageOrPrintOptions)

Converts a sparkline to an image.

toImage(fileName: string, options: ImageOrPrintOptions) : void;

Parameters:

ParameterTypeDescription
fileNamestringThe image file name.
optionsImageOrPrintOptionsThe image options

toImage(ImageOrPrintOptions)

Converts a sparkline to an image.

toImage(options: ImageOrPrintOptions) : Uint8Array;

Parameters:

ParameterTypeDescription
optionsImageOrPrintOptionsThe image options.

Returns

The result stream