/** * moved from sparkline module -- not sure why this needed a separate * module. although on reflection it might be better placed in the charts * module? (...) * * perhaps not because we use that module elsewhere and this one is only * ever used in spreadsheets. * */ import { type Cell, type CellStyle } from '../../../treb-base-types/src/index'; export interface SparklineRenderOptions { context: CanvasRenderingContext2D; width: number; height: number; cell: Cell; } export declare class Sparkline { static readonly default_color = "#888"; /** * three possible cases: * * (1) array of numbers, possibly including missing values * (2) typed array * (3) nested array, so we need to recurse and concatenate * * there's actually one more case, where data comes in from serialized * representation (loading file); in that case it's an object with numeric * indexes (sadly) */ protected static UnpackValues(underlying: unknown): number[]; protected static SparklineCommon(cell: Cell, style: CellStyle): { values: Array; colors: string[]; }; static RenderLine(width: number, height: number, context: CanvasRenderingContext2D, cell: Cell, style: CellStyle): void; static RenderColumn(width: number, height: number, context: CanvasRenderingContext2D, cell: Cell, style: CellStyle): void; }