Skip to content

charton API


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

Interface: AccessOptions ​

Defined in: packages/core/src/access.ts:35

Which drawing tools and indicators users may add. Set it with createChart or applyOptions({ access }); fields left out keep their current value. Rules hold functions, so they are never saved with a layout.

Properties ​

allow ​

allow: AccessRule | null

Defined in: packages/core/src/access.ts:44

Whether users may add item; null allows everything. Asked when the rail, the picker or a menu lists an item and when drawings.setTool() or indicators.add() runs. Drawings added with drawings.add(), indicators added with restricted: false, and anything loaded from a layout are not asked about. Default null.


limits ​

limits: AccessLimits

Defined in: packages/core/src/access.ts:46

Caps per kind. A patch replaces the whole object, so {} lifts every cap. Default {}.


refused ​

refused: "hide" | "disable"

Defined in: packages/core/src/access.ts:53

How built-in UI shows what the rules refuse: left out ('hide'), or shown disabled ('disable'), where a press fires tool:refuse or indicator:refuse for the app to handle. Default 'hide': an item the user cannot use takes no room unless the app wants to advertise it.