From: Jacco van den Berg Date: Mon, 22 Aug 2022 19:17:40 +0000 (+0200) Subject: Remove tooltip constructor fallbacks, `this.chart` and `this._chart` (#10612) X-Git-Tag: v4.0.0~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c33d87dd2fcee40970e9b0dc77b950510b0041c;p=thirdparty%2FChart.js.git Remove tooltip constructor fallbacks, `this.chart` and `this._chart` (#10612) * remove tooltip fallbacks/backwards compatability in constructor * increase size limit --- diff --git a/.size-limit.cjs b/.size-limit.cjs index e201a0ca6..c9b0b3fef 100644 --- a/.size-limit.cjs +++ b/.size-limit.cjs @@ -41,7 +41,7 @@ module.exports = [ }, { path: 'dist/chart.js', - limit: '22 KB', + limit: '22.2 KB', import: '{ CategoryScale, LinearScale, LogarithmicScale, RadialLinearScale, TimeScale, TimeSeriesScale }', running: false, modifyWebpackConfig diff --git a/docs/migration/v4-migration.md b/docs/migration/v4-migration.md index bfbaaa9f0..566f2e080 100644 --- a/docs/migration/v4-migration.md +++ b/docs/migration/v4-migration.md @@ -31,3 +31,5 @@ A number of changes were made to the configuration options passed to the `Chart` ### General * Removed fallback to `fontColor` for the legend text and strikethrough color. +* Removed `config._chart` fallback for `this.chart` in the filler plugin. +* Removed `this._chart` in the filler plugin. diff --git a/src/plugins/plugin.tooltip.js b/src/plugins/plugin.tooltip.js index a6df147a4..f1b0e9115 100644 --- a/src/plugins/plugin.tooltip.js +++ b/src/plugins/plugin.tooltip.js @@ -465,9 +465,7 @@ export class Tooltip extends Element { this._tooltipItems = []; this.$animations = undefined; this.$context = undefined; - // TODO: V4, remove config._chart and this._chart backward compatibility aliases - this.chart = config.chart || config._chart; - this._chart = this.chart; + this.chart = config.chart; this.options = config.options; this.dataPoints = undefined; this.title = undefined;