Skip to content

charton API


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

Interface: SeasonalOptions ​

Defined in: packages/core/src/seasonality/math.ts:24

How computeSeasonality compares years of daily bars: which years, the window and period, normalisation, alignment, gap handling and an optional average path.

Properties ​

align ​

align: SeasonalAlign

Defined in: packages/core/src/seasonality/math.ts:39

Default 'calendar'.


average? ​

optional average?: SeasonalAverage | null

Defined in: packages/core/src/seasonality/math.ts:37

Add an average path and the min/max range of the years around it. Default none.


gaps ​

gaps: SeasonalGaps

Defined in: packages/core/src/seasonality/math.ts:41

Default 'carry'. Only calendar alignment has gaps.


normalize ​

normalize: SeasonalNormalize

Defined in: packages/core/src/seasonality/math.ts:35

Default 'percent': change since the first bar of the window, in percent. 'indexed' starts each year at 100.


period? ​

optional period?: number

Defined in: packages/core/src/seasonality/math.ts:33

The quarter (1-4) or month (1-12) to compare for those windows. Defaults to the one holding the newest bar. Ignored for 'year'.


window ​

window: SeasonalWindow

Defined in: packages/core/src/seasonality/math.ts:28

Default 'year'.


years ​

years: number | readonly number[]

Defined in: packages/core/src/seasonality/math.ts:26

The newest n years with data, or the listed years (default 5).