Aggregation action
Use this action with change({ id: 'Aggregation', context }).
Context
id?:Get|Update(Updateis assumed if omitted)- aggregation fields for
Update:unit:Tick|Intraday|Day|Week|Month|Quarter|Yearsize: numberspec:None|Nearest|Continue|PerCount|PerVolume|PerRange|PerSecondsisContractVolume: booleandividendsAdjust: booleanbackAdjust: booleandaysToExpiration: numbercontractRoll:expiration|combined
Behavior
Aggregation supports two sub-actions:
Get: returns the current aggregation object in the same shape as aggregationUpdatefields.Update: merges provided aggregation fields into the current aggregation.
Only provided fields are changed.
Example (Get):
const currentAggregation = chart.change({ id: "Aggregation", context: { id: "Get" },});