Listen for commits that change any chart's ChartView. Edited rectangles are
matched against an index of series ranges, so edits outside every series
range cost no chart work. Charts that read formulas, references or spills
also change on any commit that changes cell values. Returns an unsubscribe
function; the index is dropped with the last listener.
Declaration
function subscribeChartChanges (
Referenced by
Workspace packages depending on @sheetwrite/core
@sheetwrite/benchdependency
@sheetwrite/chartsdependency
@sheetwrite/docs-startdependency
@sheetwrite/reactdependency
@sheetwrite/sveltedependency
@sheetwrite/vuedependency
@sheetwrite/xlsxdependency
Public exports naming subscribeChartChanges
interface Store {
getWorkbook(): Workbook;
getCell(addr: CellAddress): ResolvedCell;
getFormula(addr: CellAddress): string | null;
getSpillAnchor(addr: CellAddress): CellAddress | null;
getRefTarget(addr: CellAddress): CellAddress | null;
recalculateVolatile(now?: Date): void;
getVisibleWindow(
sheet: SheetId,
rows: { start: number; end: number },
cols: readonly number[],
): VisibleWindowView;
getDataWindow?(
sheet: SheetId,
rows: { start: number; end: number },
// … 27 more lines — see the API reference
} interface Store {
getWorkbook () : Workbook ;
getCell ( addr : CellAddress ) : ResolvedCell ;
getFormula ( addr : CellAddress ) : string | null ;
getSpillAnchor ( addr : CellAddress ) : CellAddress | null ;
getRefTarget ( addr : CellAddress ) : CellAddress | null ;
recalculateVolatile ( now ?: Date ) : void ;
getVisibleWindow (
sheet : SheetId ,
rows : { start : number ; end : number },
cols : readonly number [],
) : VisibleWindowView ;
getDataWindow ? (
sheet : SheetId ,
rows : { start : number ; end : number },
// … 27 more lines — see the API reference
} interface Store {
getWorkbook () : Workbook ;
getCell (
addr : CellAddress ,
) : ResolvedCell ;
getFormula (
addr : CellAddress ,
) : string | null ;
getSpillAnchor (
addr : CellAddress ,
) : CellAddress | null ;
getRefTarget (
addr : CellAddress ,
) : CellAddress | null ;
recalculateVolatile (
now ?: Date ,
) : void ;
getVisibleWindow (
sheet : SheetId ,
// … 60 more lines — see the API reference
} Columnar workbook storage, query, transaction, and subscription contract. API reference → type ChartChangeListener = (event: ChartChangeEvent) => void; type ChartChangeListener = ( event : ChartChangeEvent ) => void ; type ChartChangeListener = (
event : ChartChangeEvent ,
) => void ; Listener for subscribeChartChanges and ChartViewProvider.subscribe. API reference →