diff --git a/docs/guide/migrationV2.md b/docs/guide/migrationV2.md index 0d3f4d207..32892cad5 100644 --- a/docs/guide/migrationV2.md +++ b/docs/guide/migrationV2.md @@ -13,6 +13,9 @@ A number of changes were made to the configuration options passed to the plugin * `xScaleID` option default has been changed, now set to `undefined`. If the option is missing, the plugin will try to use the first scale of the chart, configured as `'x'` axis. If more than one scale has been defined in the chart as `'x'` axis, the option is mandatory to select the right scale. * `yScaleID` option default has been changed, now set to `undefined`. If the option is missing, the plugin will try to use the first scale of the chart, configured as `'y'` axis. If more than one scale has been defined in the chart as `'y'` axis, the option is mandatory to select the right scale. * When [stacked scales](https://www.chartjs.org/docs/latest/axes/cartesian/#common-options-to-all-cartesian-axes) are used, instead of the whole chart area, the designated scale area is used as fallback for `xMin`, `xMax`, `yMin`, `yMax`, `xValue` or `yValue` options. + * `position` for the label of the line annotation changes the behavior when `start` or `end` is set, and when the line annotation location is defined by `xMin`, `xMax`, `yMin`, and `yMax` options. + * in the previous version 1.x, if the `position` was set to `start` or `end`, it was calculated using chart area dimension (when `start` using `top` or `left`, when `end` using `bottom` or `right`). + * in version 2.x, if the `position` is set to `start`, it is the point where the line starts being drawn, and when set to `end`, it is the point where the line ends drawing. The `xMin`, `xMax`, `yMin`, and `yMax` options are not related to the chart area anymore but are related to the values sequence (and their order) on the associated scale. * `cornerRadius` option was replaced by `borderRadius` in the box annotation configuration and in the label configuration of line annotation to align with Chart.js options. * `xPadding` and `yPadding` options were merged into a single `padding` object in the label configuration of line annotation to align with Chart.js options. * `enabled` option was replaced by `display` in the callout configuration of label annotation, in the label configuration of line and box annotations and in the arrow heads configuration of line annotation to have the same option on all elements.