From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Sat, 28 Dec 2019 13:19:32 +0000 (-0800) Subject: Alphabetize migration guide (#6865) X-Git-Tag: v3.0.0-alpha~181 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e39970d494edf5f503072e0b0038b46465233868;p=thirdparty%2FChart.js.git Alphabetize migration guide (#6865) Alphabetize migration guide --- diff --git a/docs/getting-started/v3-migration.md b/docs/getting-started/v3-migration.md index ee719fe98..a46a658d2 100644 --- a/docs/getting-started/v3-migration.md +++ b/docs/getting-started/v3-migration.md @@ -19,26 +19,25 @@ Chart.js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released ### Interactions -* `options.onClick` is now limited to the chart area -* `{mode: 'single'}` was replaced with `{mode: 'nearest', intersect: true}` * `{mode: 'label'}` was replaced with `{mode: 'index'}` +* `{mode: 'single'}` was replaced with `{mode: 'nearest', intersect: true}` * `modes['X-axis']` was replaced with `{mode: 'index', intersect: false}` +* `options.onClick` is now limited to the chart area ### Customizability * `custom` attribute of elements was removed. Please use scriptable options -* The `zeroLine*` options of axes were removed. Use scriptable scale options instead. * The `hover` property of scriptable options `context` object was renamed to `active` to align it with the datalabels plugin. +* The `zeroLine*` options of axes were removed. Use scriptable scale options instead. ### Options -* The dataset option `tension` was renamed to `lineTension` * `scales.[x/y]Axes` arrays were removed. Scales are now configured directly to `options.scales` object with the object key being the scale Id. * `scales.[x/y]Axes.barPercentage` was moved to dataset option `barPercentage` * `scales.[x/y]Axes.barThickness` was moved to dataset option `barThickness` * `scales.[x/y]Axes.categoryPercentage` was moved to dataset option `categoryPercentage` -* `scales.[x/y]Axes.minBarLength` was moved to dataset option `minBarLength` * `scales.[x/y]Axes.maxBarThickness` was moved to dataset option `maxBarThickness` +* `scales.[x/y]Axes.minBarLength` was moved to dataset option `minBarLength` * `scales.[x/y]Axes.ticks.beginAtZero` was renamed to `scales[id].beginAtZero` * `scales.[x/y]Axes.ticks.max` was renamed to `scales[id].max` * `scales.[x/y]Axes.ticks.min` was renamed to `scales[id].min` @@ -48,6 +47,7 @@ Chart.js 3.0 introduces a number of breaking changes. Chart.js 2.0 was released * `scales.[x/y]Axes.time.format` was renamed to `scales[id].time.parser` * `scales.[x/y]Axes.time.max` was renamed to `scales[id].max` * `scales.[x/y]Axes.time.min` was renamed to `scales[id].min` +* The dataset option `tension` was renamed to `lineTension` ### Animations @@ -60,13 +60,23 @@ Animation system was completely rewritten in Chart.js v3. Each property can now ### Removed +* `Chart.chart.chart` +* `Chart.Controller` +* `Chart.types` +* `DatasetController.addElementAndReset` +* `DatasetController.createMetaData` +* `DatasetController.createMetaDataset` +* `Element.getArea` +* `Element.height` +* `Element.initialize` +* `Element.inLabelRange` * `helpers.addEvent` * `helpers.aliasPixel` * `helpers.configMerge` * `helpers.indexOf` * `helpers.lineTo` -* `helpers.min` * `helpers.max` +* `helpers.min` * `helpers.nextItem` * `helpers.numberOfLabelLines` * `helpers.previousItem` @@ -74,22 +84,12 @@ Animation system was completely rewritten in Chart.js v3. Each property can now * `helpers.roundedRect` * `helpers.scaleMerge` * `helpers.where` -* `Chart.Controller` -* `Chart.chart.chart` -* `Chart.types` -* `DatasetController.addElementAndReset` -* `DatasetController.createMetaData` -* `DatasetController.createMetaDataset` -* `Element.getArea` -* `Element.height` -* `Element.initialize` -* `Element.inLabelRange` * `IPlugin.afterScaleUpdate`. Use `afterLayout` instead * `Line.calculatePointY` * `Scale.getRightValue` +* `Scale.handleDirectionalChanges` is now private * `Scale.mergeTicksOptions` * `Scale.ticksAsNumbers` -* `Scale.handleDirectionalChanges` is now private * `Scale.tickValues` is now private * The tooltip item's `x` and `y` attributes were removed. Use `datasetIndex` and `index` to get the element and any corresponding data from it @@ -104,35 +104,36 @@ Animation system was completely rewritten in Chart.js v3. Each property can now ### Renamed +* `Chart.Animation.animationObject` was renamed to `Chart.Animation` +* `Chart.Animation.chartInstance` was renamed to `Chart.Animation.chart` +* `DatasetController.updateElement` was renamed to `DatasetController.updateElements` +* `helpers._decimalPlaces` was renamed to `helpers.math._decimalPlaces` +* `helpers.almostEquals` was renamed to `helpers.math.almostEquals` +* `helpers.almostWhole` was renamed to `helpers.math.almostWhole` +* `helpers.callCallback` was renamed to `helpers.callback` * `helpers.clear` was renamed to `helpers.canvas.clear` +* `helpers.distanceBetweenPoints` was renamed to `helpers.math.distanceBetweenPoints` * `helpers.drawRoundedRectangle` was renamed to `helpers.canvas.roundedRect` -* `helpers.callCallback` was renamed to `helpers.callback` -* `helpers.getValueOrDefault` was renamed to `helpers.valueOrDefault` +* `helpers.getAngleFromPoint` was renamed to `helpers.math.getAngleFromPoint` +* `helpers.getMaximumHeight` was renamed to `helpers.dom.getMaximumHeight` +* `helpers.getMaximumWidth` was renamed to `helpers.dom.getMaximumWidth` +* `helpers.getRelativePosition` was renamed to `helpers.dom.getRelativePosition` +* `helpers.getStyle` was renamed to `helpers.dom.getStyle` * `helpers.getValueAtIndexOrDefault` was renamed to `helpers.valueAtIndexOrDefault` +* `helpers.getValueOrDefault` was renamed to `helpers.valueOrDefault` * `helpers.easingEffects` was renamed to `helpers.easing.effects` * `helpers.log10` was renamed to `helpers.math.log10` -* `helpers.almostEquals` was renamed to `helpers.math.almostEquals` -* `helpers.almostWhole` was renamed to `helpers.math.almostWhole` -* `helpers.distanceBetweenPoints` was renamed to `helpers.math.distanceBetweenPoints` * `helpers.isNumber` was renamed to `helpers.math.isNumber` * `helpers.sign` was renamed to `helpers.math.sign` +* `helpers.retinaScale` was renamed to `helpers.dom.retinaScale` +* `helpers.splineCurve` was renamed to `helpers.curve.splineCurve` +* `helpers.splineCurveMonotone` was renamed to `helpers.curve.splineCurveMonotone` * `helpers.toDegrees` was renamed to `helpers.math.toDegrees` * `helpers.toRadians` was renamed to `helpers.math.toRadians` -* `helpers.getAngleFromPoint` was renamed to `helpers.math.getAngleFromPoint` -* `helpers.splineCurveMonotone` was renamed to `helpers.curve.splineCurveMonotone` -* `helpers.splineCurve` was renamed to `helpers.curve.splineCurve` -* `helpers.retinaScale` was renamed to `helpers.dom.retinaScale` -* `helpers.getMaximumWidth` was renamed to `helpers.dom.getMaximumWidth` -* `helpers.getMaximumHeight` was renamed to `helpers.dom.getMaximumHeight` -* `helpers.getRelativePosition` was renamed to `helpers.dom.getRelativePosition` -* `helpers.getStyle` was renamed to `helpers.dom.getStyle` -* `Chart.Animation.animationObject` was renamed to `Chart.Animation` -* `Chart.Animation.chartInstance` was renamed to `Chart.Animation.chart` -* `DatasetController.updateElement` was renamed to `DatasetController.updateElements` * `Scale.calculateTickRotation` was renamed to `Scale.calculateLabelRotation` * `TimeScale.getLabelCapacity` was renamed to `TimeScale._getLabelCapacity` -* `TimeScale.tickFormatFunction` was renamed to `TimeScale._tickFormatFunction` * `TimeScale.getPixelForOffset` was renamed to `TimeScale._getPixelForOffset` +* `TimeScale.tickFormatFunction` was renamed to `TimeScale._tickFormatFunction` * `Tooltip.options.legendColorBackgroupd` was renamed to `Tooltip.options.multiKeyBackground` #### Renamed private APIs @@ -149,11 +150,11 @@ Animation system was completely rewritten in Chart.js v3. Each property can now ##### Ticks -* When the `autoSkip` option is enabled, `Scale.ticks` now contains only the non-skipped ticks instead of all ticks. -* `Scale.ticks` now contains objects instead of strings -* `Scale.buildTicks` is now expected to return tick objects * `Scale.afterBuildTicks` now has no parameters like the other callbacks +* `Scale.buildTicks` is now expected to return tick objects * `Scale.convertTicksToLabels` was renamed to `generateTickLabels`. It is now expected to set the label property on the ticks given as input +* `Scale.ticks` now contains objects instead of strings +* When the `autoSkip` option is enabled, `Scale.ticks` now contains only the non-skipped ticks instead of all ticks. ##### Time Scale