Skip to content

charton API


charton API / @chart-on/core / index / setContextBudget

Function: setContextBudget() ​

setContextBudget(n): void

Defined in: packages/core/src/gl/context-budget.ts:207

Set how many WebGL contexts the charts on this page may hold at once (default 12, or 6 with a coarse pointer). Past it, the chart out of view the longest gives its context up, and takes one back when it scrolls into view or is interacted with. Lowering the budget evicts at once.

Parameters ​

n ​

number

Returns ​

void