Skip to main content
Version: 8.1

updateSeries

Updates the series array, overriding the existing data. Supports options for animation, zoom maintenance, and data synchronization with the Gateway.

See updateSeries – ApexCharts Docs for more information.

Overview

Syntax

component.updateSeries(
newSeries,
[animate],
[maintainZoom],
[syncProps],
[fetchResults]
)

Parameters

TypeParameterDescription
List[dict]newSeriesThe new series array to replace the existing one.
BooleananimateOptional. Whether to animate the chart on re-rendering. Default is True.
BooleanmaintainZoomOptional. Whether to maintain zoom if the chart is already zoomed in. Default is True.
BooleansyncPropsOptional. If True, syncs the updated series with the Gateway's property model via websocket. Default is False.
BooleanfetchResultsOptional. If True, sends the series data to the browser via HTTP GET instead of websocket to avoid websocket timeouts. Default is False.

Returns

None

Examples

Update Series with Sync Props Enabled

self.getSibling("apexchart").updateSeries(
newSeries=[{"data": [32, 44, 31, 41, 22]}],
syncProps=True
)

Update Series without Maintaining Zoom

self.getSibling("apexchart").updateSeries(
newSeries=[{"data": [32, 44, 31, 41, 22]}],
maintainZoom=False
)