React ChartsUpgrade to AG Charts 13.0

What's New Copy Link

See the release post for feature highlights of what's new in this major version.

Users of integrated charting on AG Grid, should refer to this migration guide when upgrading to AG Grid 35.0.

Breaking Changes Copy Link

The full list of breaking changes across all features for version 13.0.

Breaking Changes

This release includes the following breaking changes:

Modules Copy Link

Module Registration is now required, unless using the UMD bundle.

Use AllCommunityModule or AllEnterpriseModule for simplicity, or import specific modules.

The minimum change required is to add the following to your app.

AG Charts Community

import { AllCommunityModule, ModuleRegistry } from 'ag-charts-community';

ModuleRegistry.registerModules([AllCommunityModule]);

AG Charts Enterprise

import { AllEnterpriseModule, ModuleRegistry } from 'ag-charts-enterprise';

ModuleRegistry.registerModules([AllEnterpriseModule]);

See Module Registry for more details.

Axes Changes Copy Link

The axes option is now a dictionary instead of an array. Use default 'x', 'y', 'angle', 'radius' keys or define your own.

The minimum change required is to replace

{
    axes: [
        { type: 'category', position: 'bottom' },
        { type: 'number', position: 'left' },
    ],
}

with

{
    axes: {
        x: { type: 'category', position: 'bottom' },
        y: { type: 'number', position: 'left' },
    },
}

Only options to be changed need to be specified, so

{
    axes: {
        x: { type: 'category', position: 'bottom' },
        y: { type: 'number', position: 'left', title: { text: 'Price' } },
    },
}

can be specified as

{
    axes: {
        y: { title: { text: 'Price' } },
    },
}

Although optional, we recommend supplying type to aid in type-checking and options validation, and position to avoid ambiguity when using secondary axes.

The axes.keys option is removed. Use the series _KeyAxes properties to link to axes when using secondary or named axes.

See Axis Configuration for more details.

Highlight Changes Copy Link

  • highlightStyle is removed from treemap and sunburst series. Use highlight options and itemStyler callbacks instead.
  • The highlighted boolean is removed from all callback params. Use highlightState instead.

Miscellaneous Copy Link

  • All callbacks that used to return a string or string | TextSegment[] now also support returning a number or Date value.
  • TextSegments now also support string | number | Date in the text field.
  • itemId used in waterfall, range-area, range-bar, candlestick and ohlc series formatter, styler and renderers is removed and replaced by itemType
  • itemId type in event parameters is updated from string to string | number.

Behaviour Changes Copy Link

The full list of behaviour changes across all features for version 13.0.

Behaviour Changes

This release includes the following behaviour changes:

Axes Copy Link

  • interval.placement defaults to 'between' instead of 'on'.
  • min and max are absolute values and not overridden by nice. Use preferredMin and preferredMax for more flexible options.

Highlighting Copy Link

  • Default highlighting now de-emphasises unhighlighted items and series. Use the series highlight options to customise.
  • highlight.bringToFront defaults to true for all series. Use bringToFront: false to disable.
  • highlight.drawingMode defaults to 'cutout' instead of 'overlay'.
  • Financial Charts have highlight.enabled: false on all series.

Other Changes Copy Link

  • zoom.enableAxisScrolling defaults to true. Use enableAxisScrolling: false to disable.
  • The new zoom.onDataChange.strategy of 'preserveDomain' is the default. Use 'preserveRatios' for previous behaviour.
  • The new zoom.onDataChange.stickToEnd option defaults to true for Financial Charts.
  • Sankey series use the full width of the series area when edgePlacement: undefined. Use seriesArea.padding to adjust.
  • maxRenderedItems for scatter and bubble series defaults to 2000 instead of 10000.

Removal of Deprecated APIs Copy Link

The following APIs have been deprecated since version 12 and have now been removed.

Removed Deprecated APIs
  • highlightStyle is removed from all series. Use highlight options instead.
  • AgSeriesAreaPaddingOptions type is removed. Use the identical PaddingOptions or Padding types instead.

Deprecations Copy Link

There are no deprecations in AG Charts version 13.0.

Changes List Copy Link

See the full list of changes in the AG Charts 13.0 changelog.