This release includes the following breaking changes:
Modules
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
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
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
- 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 itemTypeitemId type in event parameters is updated from string to string | number.