Skip to content

charton API


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

Function: indicatorSetFits() ​

indicatorSetFits(set, interval): boolean

Defined in: packages/core/src/indicators/sets.ts:127

Whether set is meant for interval (e.g. '15m'): true when it has no appliesOn scope or one of its ranges holds the interval, false for an invalid scope. Apps use it to apply a set when the user switches to a matching interval. An activity interval ('100T') fits only a set without a scope. Throws a ChartError on an unknown interval, like parseInterval.

Parameters ​

set ​

Pick<IndicatorSet, "appliesOn">

interval ​

string

Returns ​

boolean