React ChartsCreate/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 AgChartOptions structure.

The following example demonstrates both create and update cases:

  • Definition of an options object used to create the initial chart state.
  • Buttons that invoke mutations of the options and trigger update of the chart state.

Destroying Charts

Charts are automatically destroyed when the AG Charts component is removed from the DOM.