Const Simple Moving Average
const series = chart.addLineSeries({
schema: {
x: { pattern: 'progressive' },
yRaw: { pattern: null },
ySMA: { pattern: null, derived: builtInDataDerivations.SMA({ source: 'yRaw', window: 100 }) }
}
}).setDataMapping({ x: 'x', y: 'ySMA' })
series.appendSamples({ x: [...], yRaw: [...] })
Optional window?: number
Built-in convenience options for DataSetDerivedPropertyConfig
Can be used to automatically calculate properties of
DataSetbased on other data properties.