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
Property | Type | Description |
---|---|---|
dataRange | string | Represents the data range of the sparkline. |
row | number | Readonly. Gets the row index of the sparkline. |
column | number | Readonly. Gets the column index of the sparkline. |
Methods
Method | Description |
---|---|
getDataRange() | @deprecated. Please use the ‘dataRange’ property instead. Represents the data range of the sparkline. |
setDataRange(string) | @deprecated. Please use the ‘dataRange’ property instead. Represents the data range of the sparkline. |
getRow() | @deprecated. Please use the ‘row’ property instead. Gets the row index of the sparkline. |
getColumn() | @deprecated. Please use the ‘column’ property instead. Gets the column index of the sparkline. |
toImage(string, ImageOrPrintOptions) | Converts a sparkline to an image. |
toImage(ImageOrPrintOptions) | Converts a sparkline to an image. |
isNull() | Checks whether the implementation object is null. |
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;
getDataRange()
@deprecated. Please use the ‘dataRange’ property instead. Represents the data range of the sparkline.
getDataRange() : string;
setDataRange(string)
@deprecated. Please use the ‘dataRange’ property instead. Represents the data range of the sparkline.
setDataRange(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getRow()
@deprecated. Please use the ‘row’ property instead. Gets the row index of the sparkline.
getRow() : number;
getColumn()
@deprecated. Please use the ‘column’ property instead. 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:
Parameter | Type | Description |
---|---|---|
fileName | string | The image file name. |
options | ImageOrPrintOptions | The image options |
toImage(ImageOrPrintOptions)
Converts a sparkline to an image.
toImage(options: ImageOrPrintOptions) : Uint8Array;
Parameters:
Parameter | Type | Description |
---|---|---|
options | ImageOrPrintOptions | The image options. |
Returns
The result stream
isNull()
Checks whether the implementation object is null.
isNull() : boolean;