Angular Charts: Create/Update
Learn about creating and updating charts in more detail.
Creating and Updating Charts
AgChartOptions are supplied to the AG Charts component, and mutations of the options trigger an update of the chart configuration.
See the Options Reference for more detail about the
The following example demonstrates both create and update cases:
- Definition of an
optionsobject used to create the initial chart state.
- Buttons that invoke mutations of the
optionsand trigger update of the chart state.
Delta Options Update
AgChart exposes an
updateDelta() static method to allow partial updates to an existing charts configuration:
updateDelta() should not be normally used with the AG Charts component; framework change detection and updates
to the chart apply automatically after an options change.
However when using Integrated Charts it may be necessary to use this API to perform chart updates in Grid callbacks.
Charts are automatically destroyed when the AG Charts component is removed from the DOM.