Sparkline

Sparkline class

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

class Sparkline;

Methods

MethodDescription
getDataRange()Represents the data range of the sparkline.
setDataRange(string)Represents the data range of the sparkline.
getRow()Gets the row index of the sparkline.
getColumn()Gets the column index of the sparkline.
toImage(string, ImageOrPrintOptions)Converts a sparkline to an image.
toImage(ImageOrPrintOptions)Converts a sparkline to an image.

getDataRange()

Represents the data range of the sparkline.

getDataRange() : string;

setDataRange(string)

Represents the data range of the sparkline.

setDataRange(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getRow()

Gets the row index of the sparkline.

getRow() : number;

getColumn()

Gets the column index of the sparkline.

getColumn() : 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