Skip to content

charton API


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

Interface: SeasonalityOptions ​

Defined in: packages/core/src/seasonality/view.ts:22

Options for createSeasonality: the seasonal comparison settings, where the daily bars come from, and the line colours.

Extends ​

Properties ​

align? ​

optional align?: SeasonalAlign

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

Default 'calendar'.

Inherited from ​

SeasonalOptions.align


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.

Inherited from ​

SeasonalOptions.average


averageColor? ​

optional averageColor?: string

Defined in: packages/core/src/seasonality/view.ts:32

Colour of the average path and its range. Defaults to the theme's line.


bars? ​

optional bars?: readonly Bar[]

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

Daily bars to use instead of loading a symbol; setBars replaces them.


colors? ​

optional colors?: readonly string[]

Defined in: packages/core/src/seasonality/view.ts:30

Year line colours, oldest year first; they repeat when there are more years.


gaps? ​

optional gaps?: SeasonalGaps

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

Default 'carry'. Only calendar alignment has gaps.

Inherited from ​

SeasonalOptions.gaps


normalize? ​

optional 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.

Inherited from ​

SeasonalOptions.normalize


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'.

Inherited from ​

SeasonalOptions.period


range? ​

optional range?: boolean

Defined in: packages/core/src/seasonality/view.ts:34

Shade the min/max range of the years around the average path (default true when average is set).


source? ​

optional source?: DataSource

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

Where symbol loads from. Defaults to the chart's data source (chart.setDataSource).


symbol? ​

optional symbol?: string

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

Symbol to load daily bars for, through source.


window? ​

optional window?: SeasonalWindow

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

Default 'year'.

Inherited from ​

SeasonalOptions.window


years? ​

optional 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).

Inherited from ​

SeasonalOptions.years