chartkick 5.2.0 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chart.js v4.5.0
2
+ * Chart.js v4.5.1
3
3
  * https://www.chartjs.org
4
4
  * (c) 2025 Chart.js Contributors
5
5
  * Released under the MIT License
@@ -3169,19 +3169,19 @@
3169
3169
  try {
3170
3170
  for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
3171
3171
  var scope = _step9.value;
3172
- var _iterator10 = _createForOfIteratorHelper$1(Object.keys(scope).filter(function (k) {
3172
+ var _iterator0 = _createForOfIteratorHelper$1(Object.keys(scope).filter(function (k) {
3173
3173
  return !k.startsWith('_');
3174
3174
  })),
3175
- _step10;
3175
+ _step0;
3176
3176
  try {
3177
- for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
3178
- var key = _step10.value;
3177
+ for (_iterator0.s(); !(_step0 = _iterator0.n()).done;) {
3178
+ var key = _step0.value;
3179
3179
  set.add(key);
3180
3180
  }
3181
3181
  } catch (err) {
3182
- _iterator10.e(err);
3182
+ _iterator0.e(err);
3183
3183
  } finally {
3184
- _iterator10.f();
3184
+ _iterator0.f();
3185
3185
  }
3186
3186
  }
3187
3187
  } catch (err) {
@@ -3565,10 +3565,10 @@
3565
3565
  */
3566
3566
  function retinaScale(chart, forceRatio, forceStyle) {
3567
3567
  var pixelRatio = forceRatio || 1;
3568
- var deviceHeight = Math.floor(chart.height * pixelRatio);
3569
- var deviceWidth = Math.floor(chart.width * pixelRatio);
3570
- chart.height = Math.floor(chart.height);
3571
- chart.width = Math.floor(chart.width);
3568
+ var deviceHeight = round1(chart.height * pixelRatio);
3569
+ var deviceWidth = round1(chart.width * pixelRatio);
3570
+ chart.height = round1(chart.height);
3571
+ chart.width = round1(chart.width);
3572
3572
  var canvas = chart.canvas;
3573
3573
  // If no style has been set on the canvas, the render size is used as display size,
3574
3574
  // making the chart visually bigger, so let's enforce it to the "correct" values.
@@ -3985,11 +3985,11 @@
3985
3985
  start = e % count;
3986
3986
  }
3987
3987
  }
3988
- var _iterator11 = _createForOfIteratorHelper$1(segments),
3989
- _step11;
3988
+ var _iterator1 = _createForOfIteratorHelper$1(segments),
3989
+ _step1;
3990
3990
  try {
3991
- for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
3992
- var segment = _step11.value;
3991
+ for (_iterator1.s(); !(_step1 = _iterator1.n()).done;) {
3992
+ var segment = _step1.value;
3993
3993
  start = spanGaps ? start : segment.start;
3994
3994
  var prev = points[start % count];
3995
3995
  var style = void 0;
@@ -4014,9 +4014,9 @@
4014
4014
  }
4015
4015
  }
4016
4016
  } catch (err) {
4017
- _iterator11.e(err);
4017
+ _iterator1.e(err);
4018
4018
  } finally {
4019
- _iterator11.f();
4019
+ _iterator1.f();
4020
4020
  }
4021
4021
  return result;
4022
4022
  }
@@ -6447,21 +6447,29 @@
6447
6447
  labels: {
6448
6448
  generateLabels: function generateLabels(chart) {
6449
6449
  var data = chart.data;
6450
+ var _chart$legend$options2 = chart.legend.options.labels,
6451
+ pointStyle = _chart$legend$options2.pointStyle,
6452
+ textAlign = _chart$legend$options2.textAlign,
6453
+ color = _chart$legend$options2.color,
6454
+ useBorderRadius = _chart$legend$options2.useBorderRadius,
6455
+ borderRadius = _chart$legend$options2.borderRadius;
6450
6456
  if (data.labels.length && data.datasets.length) {
6451
- var _chart$legend$options2 = chart.legend.options.labels,
6452
- pointStyle = _chart$legend$options2.pointStyle,
6453
- color = _chart$legend$options2.color;
6454
6457
  return data.labels.map(function (label, i) {
6455
6458
  var meta = chart.getDatasetMeta(0);
6456
6459
  var style = meta.controller.getStyle(i);
6457
6460
  return {
6458
6461
  text: label,
6459
6462
  fillStyle: style.backgroundColor,
6460
- strokeStyle: style.borderColor,
6461
6463
  fontColor: color,
6464
+ hidden: !chart.getDataVisibility(i),
6465
+ lineDash: style.borderDash,
6466
+ lineDashOffset: style.borderDashOffset,
6467
+ lineJoin: style.borderJoinStyle,
6462
6468
  lineWidth: style.borderWidth,
6469
+ strokeStyle: style.borderColor,
6470
+ textAlign: textAlign,
6463
6471
  pointStyle: pointStyle,
6464
- hidden: !chart.getDataVisibility(i),
6472
+ borderRadius: useBorderRadius && (borderRadius || style.borderRadius),
6465
6473
  index: i
6466
6474
  };
6467
6475
  });
@@ -7931,18 +7939,18 @@
7931
7939
  var canvas = chart.canvas;
7932
7940
  var observer = new MutationObserver(function (entries) {
7933
7941
  var trigger = false;
7934
- var _iterator10 = _createForOfIteratorHelper$1(entries),
7935
- _step10;
7942
+ var _iterator0 = _createForOfIteratorHelper$1(entries),
7943
+ _step0;
7936
7944
  try {
7937
- for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
7938
- var entry = _step10.value;
7945
+ for (_iterator0.s(); !(_step0 = _iterator0.n()).done;) {
7946
+ var entry = _step0.value;
7939
7947
  trigger = trigger || nodeListContains(entry.removedNodes, canvas);
7940
7948
  trigger = trigger && !nodeListContains(entry.addedNodes, canvas);
7941
7949
  }
7942
7950
  } catch (err) {
7943
- _iterator10.e(err);
7951
+ _iterator0.e(err);
7944
7952
  } finally {
7945
- _iterator10.f();
7953
+ _iterator0.f();
7946
7954
  }
7947
7955
  if (trigger) {
7948
7956
  listener();
@@ -9549,9 +9557,9 @@
9549
9557
  value: function drawBorder() {
9550
9558
  var chart = this.chart,
9551
9559
  ctx = this.ctx,
9552
- _this$options10 = this.options,
9553
- border = _this$options10.border,
9554
- grid = _this$options10.grid;
9560
+ _this$options0 = this.options,
9561
+ border = _this$options0.border,
9562
+ grid = _this$options0.grid;
9555
9563
  var borderOpts = border.setContext(this.getContext());
9556
9564
  var axisWidth = border.display ? borderOpts.width : 0;
9557
9565
  if (!axisWidth) {
@@ -9591,11 +9599,11 @@
9591
9599
  clipArea(ctx, area);
9592
9600
  }
9593
9601
  var items = this.getLabelItems(chartArea);
9594
- var _iterator11 = _createForOfIteratorHelper$1(items),
9595
- _step11;
9602
+ var _iterator1 = _createForOfIteratorHelper$1(items),
9603
+ _step1;
9596
9604
  try {
9597
- for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
9598
- var item = _step11.value;
9605
+ for (_iterator1.s(); !(_step1 = _iterator1.n()).done;) {
9606
+ var item = _step1.value;
9599
9607
  var renderTextOptions = item.options;
9600
9608
  var tickFont = item.font;
9601
9609
  var label = item.label;
@@ -9603,9 +9611,9 @@
9603
9611
  renderText(ctx, label, 0, y, tickFont, renderTextOptions);
9604
9612
  }
9605
9613
  } catch (err) {
9606
- _iterator11.e(err);
9614
+ _iterator1.e(err);
9607
9615
  } finally {
9608
- _iterator11.f();
9616
+ _iterator1.f();
9609
9617
  }
9610
9618
  if (area) {
9611
9619
  unclipArea(ctx);
@@ -9615,10 +9623,10 @@
9615
9623
  key: "drawTitle",
9616
9624
  value: function drawTitle() {
9617
9625
  var ctx = this.ctx,
9618
- _this$options11 = this.options,
9619
- position = _this$options11.position,
9620
- title = _this$options11.title,
9621
- reverse = _this$options11.reverse;
9626
+ _this$options1 = this.options,
9627
+ position = _this$options1.position,
9628
+ title = _this$options1.title,
9629
+ reverse = _this$options1.reverse;
9622
9630
  if (!title.display) {
9623
9631
  return;
9624
9632
  }
@@ -9663,7 +9671,7 @@
9663
9671
  }, {
9664
9672
  key: "_layers",
9665
9673
  value: function _layers() {
9666
- var _this10 = this;
9674
+ var _this0 = this;
9667
9675
  var opts = this.options;
9668
9676
  var tz = opts.ticks && opts.ticks.z || 0;
9669
9677
  var gz = valueOrDefault(opts.grid && opts.grid.z, -1);
@@ -9672,26 +9680,26 @@
9672
9680
  return [{
9673
9681
  z: tz,
9674
9682
  draw: function draw(chartArea) {
9675
- _this10.draw(chartArea);
9683
+ _this0.draw(chartArea);
9676
9684
  }
9677
9685
  }];
9678
9686
  }
9679
9687
  return [{
9680
9688
  z: gz,
9681
9689
  draw: function draw(chartArea) {
9682
- _this10.drawBackground();
9683
- _this10.drawGrid(chartArea);
9684
- _this10.drawTitle();
9690
+ _this0.drawBackground();
9691
+ _this0.drawGrid(chartArea);
9692
+ _this0.drawTitle();
9685
9693
  }
9686
9694
  }, {
9687
9695
  z: bz,
9688
9696
  draw: function draw() {
9689
- _this10.drawBorder();
9697
+ _this0.drawBorder();
9690
9698
  }
9691
9699
  }, {
9692
9700
  z: tz,
9693
9701
  draw: function draw(chartArea) {
9694
- _this10.drawLabels(chartArea);
9702
+ _this0.drawLabels(chartArea);
9695
9703
  }
9696
9704
  }];
9697
9705
  }
@@ -9912,23 +9920,23 @@
9912
9920
  }, {
9913
9921
  key: "removeScales",
9914
9922
  value: function removeScales() {
9915
- for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
9916
- args[_key10] = arguments[_key10];
9923
+ for (var _len0 = arguments.length, args = new Array(_len0), _key0 = 0; _key0 < _len0; _key0++) {
9924
+ args[_key0] = arguments[_key0];
9917
9925
  }
9918
9926
  this._each('unregister', args, this.scales);
9919
9927
  }
9920
9928
  }, {
9921
9929
  key: "_each",
9922
9930
  value: function _each(method, args, typedRegistry) {
9923
- var _this11 = this;
9931
+ var _this1 = this;
9924
9932
  _toConsumableArray(args).forEach(function (arg) {
9925
- var reg = typedRegistry || _this11._getRegistryForType(arg);
9926
- if (typedRegistry || reg.isForType(arg) || reg === _this11.plugins && arg.id) {
9927
- _this11._exec(method, reg, arg);
9933
+ var reg = typedRegistry || _this1._getRegistryForType(arg);
9934
+ if (typedRegistry || reg.isForType(arg) || reg === _this1.plugins && arg.id) {
9935
+ _this1._exec(method, reg, arg);
9928
9936
  } else {
9929
9937
  each(arg, function (item) {
9930
- var itemReg = typedRegistry || _this11._getRegistryForType(item);
9931
- _this11._exec(method, itemReg, item);
9938
+ var itemReg = typedRegistry || _this1._getRegistryForType(item);
9939
+ _this1._exec(method, itemReg, item);
9932
9940
  });
9933
9941
  }
9934
9942
  });
@@ -9967,7 +9975,7 @@
9967
9975
  var PluginService = /*#__PURE__*/function () {
9968
9976
  function PluginService() {
9969
9977
  _classCallCheck$1(this, PluginService);
9970
- this._init = [];
9978
+ this._init = undefined;
9971
9979
  }
9972
9980
  return _createClass$1(PluginService, [{
9973
9981
  key: "notify",
@@ -9976,11 +9984,15 @@
9976
9984
  this._init = this._createDescriptors(chart, true);
9977
9985
  this._notify(this._init, chart, 'install');
9978
9986
  }
9987
+ if (this._init === undefined) {
9988
+ return;
9989
+ }
9979
9990
  var descriptors = filter ? this._descriptors(chart).filter(filter) : this._descriptors(chart);
9980
9991
  var result = this._notify(descriptors, chart, hook, args);
9981
9992
  if (hook === 'afterDestroy') {
9982
9993
  this._notify(descriptors, chart, 'stop');
9983
9994
  this._notify(this._init, chart, 'uninstall');
9995
+ this._init = undefined;
9984
9996
  }
9985
9997
  return result;
9986
9998
  }
@@ -9988,11 +10000,11 @@
9988
10000
  key: "_notify",
9989
10001
  value: function _notify(descriptors, chart, hook, args) {
9990
10002
  args = args || {};
9991
- var _iterator12 = _createForOfIteratorHelper$1(descriptors),
9992
- _step12;
10003
+ var _iterator10 = _createForOfIteratorHelper$1(descriptors),
10004
+ _step10;
9993
10005
  try {
9994
- for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
9995
- var descriptor = _step12.value;
10006
+ for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
10007
+ var descriptor = _step10.value;
9996
10008
  var plugin = descriptor.plugin;
9997
10009
  var method = plugin[hook];
9998
10010
  var params = [chart, args, descriptor.options];
@@ -10001,9 +10013,9 @@
10001
10013
  }
10002
10014
  }
10003
10015
  } catch (err) {
10004
- _iterator12.e(err);
10016
+ _iterator10.e(err);
10005
10017
  } finally {
10006
- _iterator12.f();
10018
+ _iterator10.f();
10007
10019
  }
10008
10020
  return true;
10009
10021
  }
@@ -10084,11 +10096,11 @@
10084
10096
  localIds = _ref2.localIds;
10085
10097
  var result = [];
10086
10098
  var context = chart.getContext();
10087
- var _iterator13 = _createForOfIteratorHelper$1(plugins),
10088
- _step13;
10099
+ var _iterator11 = _createForOfIteratorHelper$1(plugins),
10100
+ _step11;
10089
10101
  try {
10090
- for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
10091
- var plugin = _step13.value;
10102
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
10103
+ var plugin = _step11.value;
10092
10104
  var id = plugin.id;
10093
10105
  var opts = getOpts(options[id], all);
10094
10106
  if (opts === null) {
@@ -10103,9 +10115,9 @@
10103
10115
  });
10104
10116
  }
10105
10117
  } catch (err) {
10106
- _iterator13.e(err);
10118
+ _iterator11.e(err);
10107
10119
  } finally {
10108
- _iterator13.f();
10120
+ _iterator11.f();
10109
10121
  }
10110
10122
  return result;
10111
10123
  }
@@ -10157,8 +10169,8 @@
10157
10169
  if (idMatchesAxis(id)) {
10158
10170
  return id;
10159
10171
  }
10160
- for (var _len11 = arguments.length, scaleOptions = new Array(_len11 > 1 ? _len11 - 1 : 0), _key11 = 1; _key11 < _len11; _key11++) {
10161
- scaleOptions[_key11 - 1] = arguments[_key11];
10172
+ for (var _len1 = arguments.length, scaleOptions = new Array(_len1 > 1 ? _len1 - 1 : 0), _key1 = 1; _key1 < _len1; _key1++) {
10173
+ scaleOptions[_key1 - 1] = arguments[_key1];
10162
10174
  }
10163
10175
  for (var _i3 = 0, _scaleOptions = scaleOptions; _i3 < _scaleOptions.length; _i3++) {
10164
10176
  var opts = _scaleOptions[_i3];
@@ -10424,17 +10436,17 @@
10424
10436
  var subResolver = this.createResolver(scopes, context, subPrefixes);
10425
10437
  options = _attachContext(resolver, context, subResolver);
10426
10438
  }
10427
- var _iterator14 = _createForOfIteratorHelper$1(names),
10428
- _step14;
10439
+ var _iterator12 = _createForOfIteratorHelper$1(names),
10440
+ _step12;
10429
10441
  try {
10430
- for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
10431
- var prop = _step14.value;
10442
+ for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
10443
+ var prop = _step12.value;
10432
10444
  result[prop] = options[prop];
10433
10445
  }
10434
10446
  } catch (err) {
10435
- _iterator14.e(err);
10447
+ _iterator12.e(err);
10436
10448
  } finally {
10437
- _iterator14.f();
10449
+ _iterator12.f();
10438
10450
  }
10439
10451
  return result;
10440
10452
  }
@@ -10478,11 +10490,11 @@
10478
10490
  var _descriptors2 = _descriptors(proxy),
10479
10491
  isScriptable = _descriptors2.isScriptable,
10480
10492
  isIndexable = _descriptors2.isIndexable;
10481
- var _iterator15 = _createForOfIteratorHelper$1(names),
10482
- _step15;
10493
+ var _iterator13 = _createForOfIteratorHelper$1(names),
10494
+ _step13;
10483
10495
  try {
10484
- for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
10485
- var prop = _step15.value;
10496
+ for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
10497
+ var prop = _step13.value;
10486
10498
  var scriptable = isScriptable(prop);
10487
10499
  var indexable = isIndexable(prop);
10488
10500
  var value = (indexable || scriptable) && proxy[prop];
@@ -10491,13 +10503,13 @@
10491
10503
  }
10492
10504
  }
10493
10505
  } catch (err) {
10494
- _iterator15.e(err);
10506
+ _iterator13.e(err);
10495
10507
  } finally {
10496
- _iterator15.f();
10508
+ _iterator13.f();
10497
10509
  }
10498
10510
  return false;
10499
10511
  }
10500
- var version = "4.5.0";
10512
+ var version = "4.5.1";
10501
10513
  var KNOWN_POSITIONS = ['top', 'bottom', 'left', 'right', 'chartArea'];
10502
10514
  function positionIsHorizontal(position, axis) {
10503
10515
  return position === 'top' || position === 'bottom' || KNOWN_POSITIONS.indexOf(position) === -1 && axis === 'x';
@@ -10561,7 +10573,7 @@
10561
10573
  }
10562
10574
  var Chart = /*#__PURE__*/function () {
10563
10575
  function Chart(item, userConfig) {
10564
- var _this12 = this;
10576
+ var _this10 = this;
10565
10577
  _classCallCheck$1(this, Chart);
10566
10578
  var config = this.config = new Config(userConfig);
10567
10579
  var initialCanvas = getCanvas(item);
@@ -10602,7 +10614,7 @@
10602
10614
  this._animationsDisabled = undefined;
10603
10615
  this.$context = undefined;
10604
10616
  this._doResize = debounce(function (mode) {
10605
- return _this12.update(mode);
10617
+ return _this10.update(mode);
10606
10618
  }, options.resizeDelay || 0);
10607
10619
  this._dataChanges = [];
10608
10620
  instances[this.id] = this;
@@ -10620,9 +10632,9 @@
10620
10632
  return _createClass$1(Chart, [{
10621
10633
  key: "aspectRatio",
10622
10634
  get: function get() {
10623
- var _this$options12 = this.options,
10624
- aspectRatio = _this$options12.aspectRatio,
10625
- maintainAspectRatio = _this$options12.maintainAspectRatio,
10635
+ var _this$options10 = this.options,
10636
+ aspectRatio = _this$options10.aspectRatio,
10637
+ maintainAspectRatio = _this$options10.maintainAspectRatio,
10626
10638
  width = this.width,
10627
10639
  height = this.height,
10628
10640
  _aspectRatio = this._aspectRatio;
@@ -10729,7 +10741,7 @@
10729
10741
  }, {
10730
10742
  key: "buildOrUpdateScales",
10731
10743
  value: function buildOrUpdateScales() {
10732
- var _this13 = this;
10744
+ var _this11 = this;
10733
10745
  var options = this.options;
10734
10746
  var scaleOpts = options.scales;
10735
10747
  var scales = this.scales;
@@ -10768,8 +10780,8 @@
10768
10780
  scale = new scaleClass({
10769
10781
  id: id,
10770
10782
  type: scaleType,
10771
- ctx: _this13.ctx,
10772
- chart: _this13
10783
+ ctx: _this11.ctx,
10784
+ chart: _this11
10773
10785
  });
10774
10786
  scales[scale.id] = scale;
10775
10787
  }
@@ -10781,8 +10793,8 @@
10781
10793
  }
10782
10794
  });
10783
10795
  each(scales, function (scale) {
10784
- layouts.configure(_this13, scale, scale.options);
10785
- layouts.addBox(_this13, scale);
10796
+ layouts.configure(_this11, scale, scale.options);
10797
+ layouts.addBox(_this11, scale);
10786
10798
  });
10787
10799
  }
10788
10800
  }, {
@@ -10805,7 +10817,7 @@
10805
10817
  }, {
10806
10818
  key: "_removeUnreferencedMetasets",
10807
10819
  value: function _removeUnreferencedMetasets() {
10808
- var _this14 = this;
10820
+ var _this12 = this;
10809
10821
  var metasets = this._metasets,
10810
10822
  datasets = this.data.datasets;
10811
10823
  if (metasets.length > datasets.length) {
@@ -10815,7 +10827,7 @@
10815
10827
  if (datasets.filter(function (x) {
10816
10828
  return x === meta._dataset;
10817
10829
  }).length === 0) {
10818
- _this14._destroyDatasetMeta(index);
10830
+ _this12._destroyDatasetMeta(index);
10819
10831
  }
10820
10832
  });
10821
10833
  }
@@ -10862,9 +10874,9 @@
10862
10874
  }, {
10863
10875
  key: "_resetElements",
10864
10876
  value: function _resetElements() {
10865
- var _this15 = this;
10877
+ var _this13 = this;
10866
10878
  each(this.data.datasets, function (dataset, datasetIndex) {
10867
- _this15.getDatasetMeta(datasetIndex).controller.reset();
10879
+ _this13.getDatasetMeta(datasetIndex).controller.reset();
10868
10880
  }, this);
10869
10881
  }
10870
10882
  }, {
@@ -10924,9 +10936,9 @@
10924
10936
  }, {
10925
10937
  key: "_updateScales",
10926
10938
  value: function _updateScales() {
10927
- var _this16 = this;
10939
+ var _this14 = this;
10928
10940
  each(this.scales, function (scale) {
10929
- layouts.removeBox(_this16, scale);
10941
+ layouts.removeBox(_this14, scale);
10930
10942
  });
10931
10943
  this.ensureScalesHaveIDs();
10932
10944
  this.buildOrUpdateScales();
@@ -10947,21 +10959,21 @@
10947
10959
  value: function _updateHiddenIndices() {
10948
10960
  var _hiddenIndices = this._hiddenIndices;
10949
10961
  var changes = this._getUniformDataChanges() || [];
10950
- var _iterator16 = _createForOfIteratorHelper$1(changes),
10951
- _step16;
10962
+ var _iterator14 = _createForOfIteratorHelper$1(changes),
10963
+ _step14;
10952
10964
  try {
10953
- for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
10954
- var _step16$value = _step16.value,
10955
- method = _step16$value.method,
10956
- start = _step16$value.start,
10957
- count = _step16$value.count;
10965
+ for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
10966
+ var _step14$value = _step14.value,
10967
+ method = _step14$value.method,
10968
+ start = _step14$value.start,
10969
+ count = _step14$value.count;
10958
10970
  var move = method === '_removeElements' ? -count : count;
10959
10971
  moveNumericKeys(_hiddenIndices, start, move);
10960
10972
  }
10961
10973
  } catch (err) {
10962
- _iterator16.e(err);
10974
+ _iterator14.e(err);
10963
10975
  } finally {
10964
- _iterator16.f();
10976
+ _iterator14.f();
10965
10977
  }
10966
10978
  }
10967
10979
  }, {
@@ -10999,7 +11011,7 @@
10999
11011
  }, {
11000
11012
  key: "_updateLayout",
11001
11013
  value: function _updateLayout(minPadding) {
11002
- var _this17 = this;
11014
+ var _this15 = this;
11003
11015
  if (this.notifyPlugins('beforeLayout', {
11004
11016
  cancelable: true
11005
11017
  }) === false) {
@@ -11010,14 +11022,14 @@
11010
11022
  var noArea = area.width <= 0 || area.height <= 0;
11011
11023
  this._layers = [];
11012
11024
  each(this.boxes, function (box) {
11013
- var _this17$_layers;
11025
+ var _this15$_layers;
11014
11026
  if (noArea && box.position === 'chartArea') {
11015
11027
  return;
11016
11028
  }
11017
11029
  if (box.configure) {
11018
11030
  box.configure();
11019
11031
  }
11020
- (_this17$_layers = _this17._layers).push.apply(_this17$_layers, _toConsumableArray(box._layers()));
11032
+ (_this15$_layers = _this15._layers).push.apply(_this15$_layers, _toConsumableArray(box._layers()));
11021
11033
  }, this);
11022
11034
  this._layers.forEach(function (item, index) {
11023
11035
  item._idx = index;
@@ -11332,17 +11344,17 @@
11332
11344
  }, {
11333
11345
  key: "bindUserEvents",
11334
11346
  value: function bindUserEvents() {
11335
- var _this18 = this;
11347
+ var _this16 = this;
11336
11348
  var listeners = this._listeners;
11337
11349
  var platform = this.platform;
11338
11350
  var _add = function _add(type, listener) {
11339
- platform.addEventListener(_this18, type, listener);
11351
+ platform.addEventListener(_this16, type, listener);
11340
11352
  listeners[type] = listener;
11341
11353
  };
11342
11354
  var listener = function listener(e, x, y) {
11343
11355
  e.offsetX = x;
11344
11356
  e.offsetY = y;
11345
- _this18._eventHandler(e);
11357
+ _this16._eventHandler(e);
11346
11358
  };
11347
11359
  each(this.options.events, function (type) {
11348
11360
  return _add(type, listener);
@@ -11351,40 +11363,40 @@
11351
11363
  }, {
11352
11364
  key: "bindResponsiveEvents",
11353
11365
  value: function bindResponsiveEvents() {
11354
- var _this19 = this;
11366
+ var _this17 = this;
11355
11367
  if (!this._responsiveListeners) {
11356
11368
  this._responsiveListeners = {};
11357
11369
  }
11358
11370
  var listeners = this._responsiveListeners;
11359
11371
  var platform = this.platform;
11360
11372
  var _add = function _add(type, listener) {
11361
- platform.addEventListener(_this19, type, listener);
11373
+ platform.addEventListener(_this17, type, listener);
11362
11374
  listeners[type] = listener;
11363
11375
  };
11364
11376
  var _remove = function _remove(type, listener) {
11365
11377
  if (listeners[type]) {
11366
- platform.removeEventListener(_this19, type, listener);
11378
+ platform.removeEventListener(_this17, type, listener);
11367
11379
  delete listeners[type];
11368
11380
  }
11369
11381
  };
11370
11382
  var listener = function listener(width, height) {
11371
- if (_this19.canvas) {
11372
- _this19.resize(width, height);
11383
+ if (_this17.canvas) {
11384
+ _this17.resize(width, height);
11373
11385
  }
11374
11386
  };
11375
11387
  var detached;
11376
11388
  var _attached = function attached() {
11377
11389
  _remove('attach', _attached);
11378
- _this19.attached = true;
11379
- _this19.resize();
11390
+ _this17.attached = true;
11391
+ _this17.resize();
11380
11392
  _add('resize', listener);
11381
11393
  _add('detach', detached);
11382
11394
  };
11383
11395
  detached = function detached() {
11384
- _this19.attached = false;
11396
+ _this17.attached = false;
11385
11397
  _remove('resize', listener);
11386
- _this19._stop();
11387
- _this19._resize(0, 0);
11398
+ _this17._stop();
11399
+ _this17._resize(0, 0);
11388
11400
  _add('attach', _attached);
11389
11401
  };
11390
11402
  if (platform.isAttached(this.canvas)) {
@@ -11396,13 +11408,13 @@
11396
11408
  }, {
11397
11409
  key: "unbindEvents",
11398
11410
  value: function unbindEvents() {
11399
- var _this20 = this;
11411
+ var _this18 = this;
11400
11412
  each(this._listeners, function (listener, type) {
11401
- _this20.platform.removeEventListener(_this20, type, listener);
11413
+ _this18.platform.removeEventListener(_this18, type, listener);
11402
11414
  });
11403
11415
  this._listeners = {};
11404
11416
  each(this._responsiveListeners, function (listener, type) {
11405
- _this20.platform.removeEventListener(_this20, type, listener);
11417
+ _this18.platform.removeEventListener(_this18, type, listener);
11406
11418
  });
11407
11419
  this._responsiveListeners = undefined;
11408
11420
  }
@@ -11431,12 +11443,12 @@
11431
11443
  }, {
11432
11444
  key: "setActiveElements",
11433
11445
  value: function setActiveElements(activeElements) {
11434
- var _this21 = this;
11446
+ var _this19 = this;
11435
11447
  var lastActive = this._active || [];
11436
11448
  var active = activeElements.map(function (_ref4) {
11437
11449
  var datasetIndex = _ref4.datasetIndex,
11438
11450
  index = _ref4.index;
11439
- var meta = _this21.getDatasetMeta(datasetIndex);
11451
+ var meta = _this19.getDatasetMeta(datasetIndex);
11440
11452
  if (!meta) {
11441
11453
  throw new Error('No dataset found at index ' + datasetIndex);
11442
11454
  }
@@ -11488,7 +11500,7 @@
11488
11500
  }, {
11489
11501
  key: "_eventHandler",
11490
11502
  value: function _eventHandler(e, replay) {
11491
- var _this22 = this;
11503
+ var _this20 = this;
11492
11504
  var args = {
11493
11505
  event: e,
11494
11506
  replay: replay,
@@ -11496,7 +11508,7 @@
11496
11508
  inChartArea: this.isPointInArea(e)
11497
11509
  };
11498
11510
  var eventFilter = function eventFilter(plugin) {
11499
- return (plugin.options.events || _this22.options.events).includes(e["native"].type);
11511
+ return (plugin.options.events || _this20.options.events).includes(e["native"].type);
11500
11512
  };
11501
11513
  if (this.notifyPlugins('beforeEvent', args, eventFilter) === false) {
11502
11514
  return;
@@ -11825,28 +11837,28 @@
11825
11837
  }
11826
11838
  var ArcElement = /*#__PURE__*/function (_Element3) {
11827
11839
  function ArcElement(cfg) {
11828
- var _this23;
11840
+ var _this21;
11829
11841
  _classCallCheck$1(this, ArcElement);
11830
- _this23 = _callSuper(this, ArcElement);
11831
- _defineProperty$1(_this23, "circumference", void 0);
11832
- _defineProperty$1(_this23, "endAngle", void 0);
11833
- _defineProperty$1(_this23, "fullCircles", void 0);
11834
- _defineProperty$1(_this23, "innerRadius", void 0);
11835
- _defineProperty$1(_this23, "outerRadius", void 0);
11836
- _defineProperty$1(_this23, "pixelMargin", void 0);
11837
- _defineProperty$1(_this23, "startAngle", void 0);
11838
- _this23.options = undefined;
11839
- _this23.circumference = undefined;
11840
- _this23.startAngle = undefined;
11841
- _this23.endAngle = undefined;
11842
- _this23.innerRadius = undefined;
11843
- _this23.outerRadius = undefined;
11844
- _this23.pixelMargin = 0;
11845
- _this23.fullCircles = 0;
11842
+ _this21 = _callSuper(this, ArcElement);
11843
+ _defineProperty$1(_this21, "circumference", void 0);
11844
+ _defineProperty$1(_this21, "endAngle", void 0);
11845
+ _defineProperty$1(_this21, "fullCircles", void 0);
11846
+ _defineProperty$1(_this21, "innerRadius", void 0);
11847
+ _defineProperty$1(_this21, "outerRadius", void 0);
11848
+ _defineProperty$1(_this21, "pixelMargin", void 0);
11849
+ _defineProperty$1(_this21, "startAngle", void 0);
11850
+ _this21.options = undefined;
11851
+ _this21.circumference = undefined;
11852
+ _this21.startAngle = undefined;
11853
+ _this21.endAngle = undefined;
11854
+ _this21.innerRadius = undefined;
11855
+ _this21.outerRadius = undefined;
11856
+ _this21.pixelMargin = 0;
11857
+ _this21.fullCircles = 0;
11846
11858
  if (cfg) {
11847
- Object.assign(_this23, cfg);
11859
+ Object.assign(_this21, cfg);
11848
11860
  }
11849
- return _this23;
11861
+ return _this21;
11850
11862
  }
11851
11863
  _inherits$1(ArcElement, _Element3);
11852
11864
  return _createClass$1(ArcElement, [{
@@ -11882,9 +11894,9 @@
11882
11894
  endAngle = _this$getProps3.endAngle,
11883
11895
  innerRadius = _this$getProps3.innerRadius,
11884
11896
  outerRadius = _this$getProps3.outerRadius;
11885
- var _this$options13 = this.options,
11886
- offset = _this$options13.offset,
11887
- spacing = _this$options13.spacing;
11897
+ var _this$options11 = this.options,
11898
+ offset = _this$options11.offset,
11899
+ spacing = _this$options11.spacing;
11888
11900
  var halfAngle = (startAngle + endAngle) / 2;
11889
11901
  var halfRadius = (innerRadius + outerRadius + spacing + offset) / 2;
11890
11902
  return {
@@ -12102,11 +12114,11 @@
12102
12114
  var segments = line.segments,
12103
12115
  options = line.options;
12104
12116
  var segmentMethod = _getSegmentMethod(line);
12105
- var _iterator17 = _createForOfIteratorHelper$1(segments),
12106
- _step17;
12117
+ var _iterator15 = _createForOfIteratorHelper$1(segments),
12118
+ _step15;
12107
12119
  try {
12108
- for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
12109
- var segment = _step17.value;
12120
+ for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
12121
+ var segment = _step15.value;
12110
12122
  setStyle(ctx, options, segment.style);
12111
12123
  ctx.beginPath();
12112
12124
  if (segmentMethod(ctx, line, segment, {
@@ -12118,9 +12130,9 @@
12118
12130
  ctx.stroke();
12119
12131
  }
12120
12132
  } catch (err) {
12121
- _iterator17.e(err);
12133
+ _iterator15.e(err);
12122
12134
  } finally {
12123
- _iterator17.f();
12135
+ _iterator15.f();
12124
12136
  }
12125
12137
  }
12126
12138
  var usePath2D = typeof Path2D === 'function';
@@ -12133,24 +12145,24 @@
12133
12145
  }
12134
12146
  var LineElement = /*#__PURE__*/function (_Element4) {
12135
12147
  function LineElement(cfg) {
12136
- var _this24;
12148
+ var _this22;
12137
12149
  _classCallCheck$1(this, LineElement);
12138
- _this24 = _callSuper(this, LineElement);
12139
- _this24.animated = true;
12140
- _this24.options = undefined;
12141
- _this24._chart = undefined;
12142
- _this24._loop = undefined;
12143
- _this24._fullLoop = undefined;
12144
- _this24._path = undefined;
12145
- _this24._points = undefined;
12146
- _this24._segments = undefined;
12147
- _this24._decimated = false;
12148
- _this24._pointsUpdated = false;
12149
- _this24._datasetIndex = undefined;
12150
+ _this22 = _callSuper(this, LineElement);
12151
+ _this22.animated = true;
12152
+ _this22.options = undefined;
12153
+ _this22._chart = undefined;
12154
+ _this22._loop = undefined;
12155
+ _this22._fullLoop = undefined;
12156
+ _this22._path = undefined;
12157
+ _this22._points = undefined;
12158
+ _this22._segments = undefined;
12159
+ _this22._decimated = false;
12160
+ _this22._pointsUpdated = false;
12161
+ _this22._datasetIndex = undefined;
12150
12162
  if (cfg) {
12151
- Object.assign(_this24, cfg);
12163
+ Object.assign(_this22, cfg);
12152
12164
  }
12153
- return _this24;
12165
+ return _this22;
12154
12166
  }
12155
12167
  _inherits$1(LineElement, _Element4);
12156
12168
  return _createClass$1(LineElement, [{
@@ -12242,20 +12254,20 @@
12242
12254
  var loop = this._loop;
12243
12255
  start = start || 0;
12244
12256
  count = count || this.points.length - start;
12245
- var _iterator18 = _createForOfIteratorHelper$1(segments),
12246
- _step18;
12257
+ var _iterator16 = _createForOfIteratorHelper$1(segments),
12258
+ _step16;
12247
12259
  try {
12248
- for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
12249
- var segment = _step18.value;
12260
+ for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
12261
+ var segment = _step16.value;
12250
12262
  loop &= segmentMethod(ctx, this, segment, {
12251
12263
  start: start,
12252
12264
  end: start + count - 1
12253
12265
  });
12254
12266
  }
12255
12267
  } catch (err) {
12256
- _iterator18.e(err);
12268
+ _iterator16.e(err);
12257
12269
  } finally {
12258
- _iterator18.f();
12270
+ _iterator16.f();
12259
12271
  }
12260
12272
  return !!loop;
12261
12273
  }
@@ -12308,20 +12320,20 @@
12308
12320
  }
12309
12321
  var PointElement = /*#__PURE__*/function (_Element5) {
12310
12322
  function PointElement(cfg) {
12311
- var _this25;
12323
+ var _this23;
12312
12324
  _classCallCheck$1(this, PointElement);
12313
- _this25 = _callSuper(this, PointElement);
12314
- _defineProperty$1(_this25, "parsed", void 0);
12315
- _defineProperty$1(_this25, "skip", void 0);
12316
- _defineProperty$1(_this25, "stop", void 0);
12317
- _this25.options = undefined;
12318
- _this25.parsed = undefined;
12319
- _this25.skip = undefined;
12320
- _this25.stop = undefined;
12325
+ _this23 = _callSuper(this, PointElement);
12326
+ _defineProperty$1(_this23, "parsed", void 0);
12327
+ _defineProperty$1(_this23, "skip", void 0);
12328
+ _defineProperty$1(_this23, "stop", void 0);
12329
+ _this23.options = undefined;
12330
+ _this23.parsed = undefined;
12331
+ _this23.skip = undefined;
12332
+ _this23.stop = undefined;
12321
12333
  if (cfg) {
12322
- Object.assign(_this25, cfg);
12334
+ Object.assign(_this23, cfg);
12323
12335
  }
12324
- return _this25;
12336
+ return _this23;
12325
12337
  }
12326
12338
  _inherits$1(PointElement, _Element5);
12327
12339
  return _createClass$1(PointElement, [{
@@ -12518,28 +12530,28 @@
12518
12530
  }
12519
12531
  var BarElement = /*#__PURE__*/function (_Element6) {
12520
12532
  function BarElement(cfg) {
12521
- var _this26;
12533
+ var _this24;
12522
12534
  _classCallCheck$1(this, BarElement);
12523
- _this26 = _callSuper(this, BarElement);
12524
- _this26.options = undefined;
12525
- _this26.horizontal = undefined;
12526
- _this26.base = undefined;
12527
- _this26.width = undefined;
12528
- _this26.height = undefined;
12529
- _this26.inflateAmount = undefined;
12535
+ _this24 = _callSuper(this, BarElement);
12536
+ _this24.options = undefined;
12537
+ _this24.horizontal = undefined;
12538
+ _this24.base = undefined;
12539
+ _this24.width = undefined;
12540
+ _this24.height = undefined;
12541
+ _this24.inflateAmount = undefined;
12530
12542
  if (cfg) {
12531
- Object.assign(_this26, cfg);
12543
+ Object.assign(_this24, cfg);
12532
12544
  }
12533
- return _this26;
12545
+ return _this24;
12534
12546
  }
12535
12547
  _inherits$1(BarElement, _Element6);
12536
12548
  return _createClass$1(BarElement, [{
12537
12549
  key: "draw",
12538
12550
  value: function draw(ctx) {
12539
12551
  var inflateAmount = this.inflateAmount,
12540
- _this$options14 = this.options,
12541
- borderColor = _this$options14.borderColor,
12542
- backgroundColor = _this$options14.backgroundColor;
12552
+ _this$options12 = this.options,
12553
+ borderColor = _this$options12.borderColor,
12554
+ backgroundColor = _this$options12.backgroundColor;
12543
12555
  var _boundingRects = boundingRects(this),
12544
12556
  inner = _boundingRects.inner,
12545
12557
  outer = _boundingRects.outer;
@@ -12904,11 +12916,11 @@
12904
12916
  var points = line.points;
12905
12917
  var tpoints = target.points;
12906
12918
  var parts = [];
12907
- var _iterator19 = _createForOfIteratorHelper$1(segments),
12908
- _step19;
12919
+ var _iterator17 = _createForOfIteratorHelper$1(segments),
12920
+ _step17;
12909
12921
  try {
12910
- for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
12911
- var segment = _step19.value;
12922
+ for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
12923
+ var segment = _step17.value;
12912
12924
  var start = segment.start,
12913
12925
  end = segment.end;
12914
12926
  end = _findSegmentEnd(start, end, points);
@@ -12923,18 +12935,18 @@
12923
12935
  continue;
12924
12936
  }
12925
12937
  var targetSegments = _boundSegments(target, bounds);
12926
- var _iterator20 = _createForOfIteratorHelper$1(targetSegments),
12927
- _step20;
12938
+ var _iterator18 = _createForOfIteratorHelper$1(targetSegments),
12939
+ _step18;
12928
12940
  try {
12929
- for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
12930
- var tgt = _step20.value;
12941
+ for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
12942
+ var tgt = _step18.value;
12931
12943
  var subBounds = _getBounds(property, tpoints[tgt.start], tpoints[tgt.end], tgt.loop);
12932
12944
  var fillSources = _boundSegment(segment, points, subBounds);
12933
- var _iterator21 = _createForOfIteratorHelper$1(fillSources),
12934
- _step21;
12945
+ var _iterator19 = _createForOfIteratorHelper$1(fillSources),
12946
+ _step19;
12935
12947
  try {
12936
- for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
12937
- var fillSource = _step21.value;
12948
+ for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
12949
+ var fillSource = _step19.value;
12938
12950
  parts.push({
12939
12951
  source: fillSource,
12940
12952
  target: tgt,
@@ -12943,21 +12955,21 @@
12943
12955
  });
12944
12956
  }
12945
12957
  } catch (err) {
12946
- _iterator21.e(err);
12958
+ _iterator19.e(err);
12947
12959
  } finally {
12948
- _iterator21.f();
12960
+ _iterator19.f();
12949
12961
  }
12950
12962
  }
12951
12963
  } catch (err) {
12952
- _iterator20.e(err);
12964
+ _iterator18.e(err);
12953
12965
  } finally {
12954
- _iterator20.f();
12966
+ _iterator18.f();
12955
12967
  }
12956
12968
  }
12957
12969
  } catch (err) {
12958
- _iterator19.e(err);
12970
+ _iterator17.e(err);
12959
12971
  } finally {
12960
- _iterator19.f();
12972
+ _iterator17.f();
12961
12973
  }
12962
12974
  return parts;
12963
12975
  }
@@ -13409,11 +13421,11 @@
13409
13421
  var first = true;
13410
13422
  var lineLoop = false;
13411
13423
  ctx.beginPath();
13412
- var _iterator22 = _createForOfIteratorHelper$1(segments),
13413
- _step22;
13424
+ var _iterator20 = _createForOfIteratorHelper$1(segments),
13425
+ _step20;
13414
13426
  try {
13415
- for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
13416
- var segment = _step22.value;
13427
+ for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
13428
+ var segment = _step20.value;
13417
13429
  var start = segment.start,
13418
13430
  end = segment.end;
13419
13431
  var firstPoint = points[start];
@@ -13435,9 +13447,9 @@
13435
13447
  }
13436
13448
  }
13437
13449
  } catch (err) {
13438
- _iterator22.e(err);
13450
+ _iterator20.e(err);
13439
13451
  } finally {
13440
- _iterator22.f();
13452
+ _iterator20.f();
13441
13453
  }
13442
13454
  ctx.lineTo(target.first().x, clipY);
13443
13455
  ctx.closePath();
@@ -13449,11 +13461,11 @@
13449
13461
  var first = true;
13450
13462
  var lineLoop = false;
13451
13463
  ctx.beginPath();
13452
- var _iterator23 = _createForOfIteratorHelper$1(segments),
13453
- _step23;
13464
+ var _iterator21 = _createForOfIteratorHelper$1(segments),
13465
+ _step21;
13454
13466
  try {
13455
- for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
13456
- var segment = _step23.value;
13467
+ for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
13468
+ var segment = _step21.value;
13457
13469
  var start = segment.start,
13458
13470
  end = segment.end;
13459
13471
  var firstPoint = points[start];
@@ -13475,9 +13487,9 @@
13475
13487
  }
13476
13488
  }
13477
13489
  } catch (err) {
13478
- _iterator23.e(err);
13490
+ _iterator21.e(err);
13479
13491
  } finally {
13480
- _iterator23.f();
13492
+ _iterator21.f();
13481
13493
  }
13482
13494
  ctx.lineTo(clipX, target.first().y);
13483
13495
  ctx.closePath();
@@ -13491,15 +13503,15 @@
13491
13503
  scale = cfg.scale,
13492
13504
  clip = cfg.clip;
13493
13505
  var segments = _segments(line, target, property);
13494
- var _iterator24 = _createForOfIteratorHelper$1(segments),
13495
- _step24;
13506
+ var _iterator22 = _createForOfIteratorHelper$1(segments),
13507
+ _step22;
13496
13508
  try {
13497
- for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
13498
- var _step24$value = _step24.value,
13499
- src = _step24$value.source,
13500
- tgt = _step24$value.target,
13501
- start = _step24$value.start,
13502
- end = _step24$value.end;
13509
+ for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
13510
+ var _step22$value = _step22.value,
13511
+ src = _step22$value.source,
13512
+ tgt = _step22$value.target,
13513
+ start = _step22$value.start,
13514
+ end = _step22$value.end;
13503
13515
  var _src$style = src.style,
13504
13516
  _src$style2 = _src$style === void 0 ? {} : _src$style,
13505
13517
  _src$style2$backgroun = _src$style2.backgroundColor,
@@ -13531,17 +13543,17 @@
13531
13543
  ctx.restore();
13532
13544
  }
13533
13545
  } catch (err) {
13534
- _iterator24.e(err);
13546
+ _iterator22.e(err);
13535
13547
  } finally {
13536
- _iterator24.f();
13548
+ _iterator22.f();
13537
13549
  }
13538
13550
  }
13539
13551
  function clipBounds(ctx, scale, clip, bounds) {
13540
13552
  var chartArea = scale.chart.chartArea;
13541
- var _ref10 = bounds || {},
13542
- property = _ref10.property,
13543
- start = _ref10.start,
13544
- end = _ref10.end;
13553
+ var _ref0 = bounds || {},
13554
+ property = _ref0.property,
13555
+ start = _ref0.start,
13556
+ end = _ref0.end;
13545
13557
  if (property === 'x' || property === 'y') {
13546
13558
  var left, top, right, bottom;
13547
13559
  if (property === 'x') {
@@ -13663,32 +13675,32 @@
13663
13675
  };
13664
13676
  var Legend = /*#__PURE__*/function (_Element7) {
13665
13677
  function Legend(config) {
13666
- var _this27;
13678
+ var _this25;
13667
13679
  _classCallCheck$1(this, Legend);
13668
- _this27 = _callSuper(this, Legend);
13669
- _this27._added = false;
13670
- _this27.legendHitBoxes = [];
13671
- _this27._hoveredItem = null;
13672
- _this27.doughnutMode = false;
13673
- _this27.chart = config.chart;
13674
- _this27.options = config.options;
13675
- _this27.ctx = config.ctx;
13676
- _this27.legendItems = undefined;
13677
- _this27.columnSizes = undefined;
13678
- _this27.lineWidths = undefined;
13679
- _this27.maxHeight = undefined;
13680
- _this27.maxWidth = undefined;
13681
- _this27.top = undefined;
13682
- _this27.bottom = undefined;
13683
- _this27.left = undefined;
13684
- _this27.right = undefined;
13685
- _this27.height = undefined;
13686
- _this27.width = undefined;
13687
- _this27._margins = undefined;
13688
- _this27.position = undefined;
13689
- _this27.weight = undefined;
13690
- _this27.fullSize = undefined;
13691
- return _this27;
13680
+ _this25 = _callSuper(this, Legend);
13681
+ _this25._added = false;
13682
+ _this25.legendHitBoxes = [];
13683
+ _this25._hoveredItem = null;
13684
+ _this25.doughnutMode = false;
13685
+ _this25.chart = config.chart;
13686
+ _this25.options = config.options;
13687
+ _this25.ctx = config.ctx;
13688
+ _this25.legendItems = undefined;
13689
+ _this25.columnSizes = undefined;
13690
+ _this25.lineWidths = undefined;
13691
+ _this25.maxHeight = undefined;
13692
+ _this25.maxWidth = undefined;
13693
+ _this25.top = undefined;
13694
+ _this25.bottom = undefined;
13695
+ _this25.left = undefined;
13696
+ _this25.right = undefined;
13697
+ _this25.height = undefined;
13698
+ _this25.width = undefined;
13699
+ _this25._margins = undefined;
13700
+ _this25.position = undefined;
13701
+ _this25.weight = undefined;
13702
+ _this25.fullSize = undefined;
13703
+ return _this25;
13692
13704
  }
13693
13705
  _inherits$1(Legend, _Element7);
13694
13706
  return _createClass$1(Legend, [{
@@ -13717,17 +13729,17 @@
13717
13729
  }, {
13718
13730
  key: "buildLabels",
13719
13731
  value: function buildLabels() {
13720
- var _this28 = this;
13732
+ var _this26 = this;
13721
13733
  var labelOpts = this.options.labels || {};
13722
13734
  var legendItems = callback(labelOpts.generateLabels, [this.chart], this) || [];
13723
13735
  if (labelOpts.filter) {
13724
13736
  legendItems = legendItems.filter(function (item) {
13725
- return labelOpts.filter(item, _this28.chart.data);
13737
+ return labelOpts.filter(item, _this26.chart.data);
13726
13738
  });
13727
13739
  }
13728
13740
  if (labelOpts.sort) {
13729
13741
  legendItems = legendItems.sort(function (a, b) {
13730
- return labelOpts.sort(a, b, _this28.chart.data);
13742
+ return labelOpts.sort(a, b, _this26.chart.data);
13731
13743
  });
13732
13744
  }
13733
13745
  if (this.options.reverse) {
@@ -13849,19 +13861,19 @@
13849
13861
  }
13850
13862
  var titleHeight = this._computeTitleHeight();
13851
13863
  var hitboxes = this.legendHitBoxes,
13852
- _this$options15 = this.options,
13853
- align = _this$options15.align,
13854
- padding = _this$options15.labels.padding,
13855
- rtl = _this$options15.rtl;
13864
+ _this$options13 = this.options,
13865
+ align = _this$options13.align,
13866
+ padding = _this$options13.labels.padding,
13867
+ rtl = _this$options13.rtl;
13856
13868
  var rtlHelper = getRtlAdapter(rtl, this.left, this.width);
13857
13869
  if (this.isHorizontal()) {
13858
13870
  var row = 0;
13859
13871
  var left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);
13860
- var _iterator25 = _createForOfIteratorHelper$1(hitboxes),
13861
- _step25;
13872
+ var _iterator23 = _createForOfIteratorHelper$1(hitboxes),
13873
+ _step23;
13862
13874
  try {
13863
- for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
13864
- var hitbox = _step25.value;
13875
+ for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
13876
+ var hitbox = _step23.value;
13865
13877
  if (row !== hitbox.row) {
13866
13878
  row = hitbox.row;
13867
13879
  left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);
@@ -13871,18 +13883,18 @@
13871
13883
  left += hitbox.width + padding;
13872
13884
  }
13873
13885
  } catch (err) {
13874
- _iterator25.e(err);
13886
+ _iterator23.e(err);
13875
13887
  } finally {
13876
- _iterator25.f();
13888
+ _iterator23.f();
13877
13889
  }
13878
13890
  } else {
13879
13891
  var col = 0;
13880
13892
  var top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);
13881
- var _iterator26 = _createForOfIteratorHelper$1(hitboxes),
13882
- _step26;
13893
+ var _iterator24 = _createForOfIteratorHelper$1(hitboxes),
13894
+ _step24;
13883
13895
  try {
13884
- for (_iterator26.s(); !(_step26 = _iterator26.n()).done;) {
13885
- var _hitbox = _step26.value;
13896
+ for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
13897
+ var _hitbox = _step24.value;
13886
13898
  if (_hitbox.col !== col) {
13887
13899
  col = _hitbox.col;
13888
13900
  top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);
@@ -13893,9 +13905,9 @@
13893
13905
  top += _hitbox.height + padding;
13894
13906
  }
13895
13907
  } catch (err) {
13896
- _iterator26.e(err);
13908
+ _iterator24.e(err);
13897
13909
  } finally {
13898
- _iterator26.f();
13910
+ _iterator24.f();
13899
13911
  }
13900
13912
  }
13901
13913
  }
@@ -13917,7 +13929,7 @@
13917
13929
  }, {
13918
13930
  key: "_draw",
13919
13931
  value: function _draw() {
13920
- var _this29 = this;
13932
+ var _this27 = this;
13921
13933
  var opts = this.options,
13922
13934
  columnSizes = this.columnSizes,
13923
13935
  lineWidths = this.lineWidths,
@@ -14019,21 +14031,21 @@
14019
14031
  var width = boxWidth + halfFontSize + textWidth;
14020
14032
  var x = cursor.x;
14021
14033
  var y = cursor.y;
14022
- rtlHelper.setWidth(_this29.width);
14034
+ rtlHelper.setWidth(_this27.width);
14023
14035
  if (isHorizontal) {
14024
- if (i > 0 && x + width + padding > _this29.right) {
14036
+ if (i > 0 && x + width + padding > _this27.right) {
14025
14037
  y = cursor.y += lineHeight;
14026
14038
  cursor.line++;
14027
- x = cursor.x = _alignStartEnd(align, _this29.left + padding, _this29.right - lineWidths[cursor.line]);
14039
+ x = cursor.x = _alignStartEnd(align, _this27.left + padding, _this27.right - lineWidths[cursor.line]);
14028
14040
  }
14029
- } else if (i > 0 && y + lineHeight > _this29.bottom) {
14041
+ } else if (i > 0 && y + lineHeight > _this27.bottom) {
14030
14042
  x = cursor.x = x + columnSizes[cursor.line].width + padding;
14031
14043
  cursor.line++;
14032
- y = cursor.y = _alignStartEnd(align, _this29.top + titleHeight + padding, _this29.bottom - columnSizes[cursor.line].height);
14044
+ y = cursor.y = _alignStartEnd(align, _this27.top + titleHeight + padding, _this27.bottom - columnSizes[cursor.line].height);
14033
14045
  }
14034
14046
  var realX = rtlHelper.x(x);
14035
14047
  drawLegendBox(realX, y, legendItem);
14036
- x = _textX(textAlign, x + boxWidth + halfFontSize, isHorizontal ? x + width : _this29.right, opts.rtl);
14048
+ x = _textX(textAlign, x + boxWidth + halfFontSize, isHorizontal ? x + width : _this27.right, opts.rtl);
14037
14049
  fillText(rtlHelper.x(x), y, legendItem);
14038
14050
  if (isHorizontal) {
14039
14051
  cursor.x += width + padding;
@@ -14277,23 +14289,23 @@
14277
14289
  };
14278
14290
  var Title = /*#__PURE__*/function (_Element8) {
14279
14291
  function Title(config) {
14280
- var _this30;
14292
+ var _this28;
14281
14293
  _classCallCheck$1(this, Title);
14282
- _this30 = _callSuper(this, Title);
14283
- _this30.chart = config.chart;
14284
- _this30.options = config.options;
14285
- _this30.ctx = config.ctx;
14286
- _this30._padding = undefined;
14287
- _this30.top = undefined;
14288
- _this30.bottom = undefined;
14289
- _this30.left = undefined;
14290
- _this30.right = undefined;
14291
- _this30.width = undefined;
14292
- _this30.height = undefined;
14293
- _this30.position = undefined;
14294
- _this30.weight = undefined;
14295
- _this30.fullSize = undefined;
14296
- return _this30;
14294
+ _this28 = _callSuper(this, Title);
14295
+ _this28.chart = config.chart;
14296
+ _this28.options = config.options;
14297
+ _this28.ctx = config.ctx;
14298
+ _this28._padding = undefined;
14299
+ _this28.top = undefined;
14300
+ _this28.bottom = undefined;
14301
+ _this28.left = undefined;
14302
+ _this28.right = undefined;
14303
+ _this28.width = undefined;
14304
+ _this28.height = undefined;
14305
+ _this28.position = undefined;
14306
+ _this28.weight = undefined;
14307
+ _this28.fullSize = undefined;
14308
+ return _this28;
14297
14309
  }
14298
14310
  _inherits$1(Title, _Element8);
14299
14311
  return _createClass$1(Title, [{
@@ -14812,37 +14824,37 @@
14812
14824
  }
14813
14825
  var Tooltip = /*#__PURE__*/function (_Element9) {
14814
14826
  function Tooltip(config) {
14815
- var _this31;
14827
+ var _this29;
14816
14828
  _classCallCheck$1(this, Tooltip);
14817
- _this31 = _callSuper(this, Tooltip);
14818
- _this31.opacity = 0;
14819
- _this31._active = [];
14820
- _this31._eventPosition = undefined;
14821
- _this31._size = undefined;
14822
- _this31._cachedAnimations = undefined;
14823
- _this31._tooltipItems = [];
14824
- _this31.$animations = undefined;
14825
- _this31.$context = undefined;
14826
- _this31.chart = config.chart;
14827
- _this31.options = config.options;
14828
- _this31.dataPoints = undefined;
14829
- _this31.title = undefined;
14830
- _this31.beforeBody = undefined;
14831
- _this31.body = undefined;
14832
- _this31.afterBody = undefined;
14833
- _this31.footer = undefined;
14834
- _this31.xAlign = undefined;
14835
- _this31.yAlign = undefined;
14836
- _this31.x = undefined;
14837
- _this31.y = undefined;
14838
- _this31.height = undefined;
14839
- _this31.width = undefined;
14840
- _this31.caretX = undefined;
14841
- _this31.caretY = undefined;
14842
- _this31.labelColors = undefined;
14843
- _this31.labelPointStyles = undefined;
14844
- _this31.labelTextColors = undefined;
14845
- return _this31;
14829
+ _this29 = _callSuper(this, Tooltip);
14830
+ _this29.opacity = 0;
14831
+ _this29._active = [];
14832
+ _this29._eventPosition = undefined;
14833
+ _this29._size = undefined;
14834
+ _this29._cachedAnimations = undefined;
14835
+ _this29._tooltipItems = [];
14836
+ _this29.$animations = undefined;
14837
+ _this29.$context = undefined;
14838
+ _this29.chart = config.chart;
14839
+ _this29.options = config.options;
14840
+ _this29.dataPoints = undefined;
14841
+ _this29.title = undefined;
14842
+ _this29.beforeBody = undefined;
14843
+ _this29.body = undefined;
14844
+ _this29.afterBody = undefined;
14845
+ _this29.footer = undefined;
14846
+ _this29.xAlign = undefined;
14847
+ _this29.yAlign = undefined;
14848
+ _this29.x = undefined;
14849
+ _this29.y = undefined;
14850
+ _this29.height = undefined;
14851
+ _this29.width = undefined;
14852
+ _this29.caretX = undefined;
14853
+ _this29.caretY = undefined;
14854
+ _this29.labelColors = undefined;
14855
+ _this29.labelPointStyles = undefined;
14856
+ _this29.labelTextColors = undefined;
14857
+ return _this29;
14846
14858
  }
14847
14859
  _inherits$1(Tooltip, _Element9);
14848
14860
  return _createClass$1(Tooltip, [{
@@ -14894,7 +14906,7 @@
14894
14906
  }, {
14895
14907
  key: "getBody",
14896
14908
  value: function getBody(tooltipItems, options) {
14897
- var _this32 = this;
14909
+ var _this30 = this;
14898
14910
  var callbacks = options.callbacks;
14899
14911
  var bodyItems = [];
14900
14912
  each(tooltipItems, function (context) {
@@ -14904,9 +14916,9 @@
14904
14916
  after: []
14905
14917
  };
14906
14918
  var scoped = overrideCallbacks(callbacks, context);
14907
- pushOrConcat(bodyItem.before, splitNewlines(invokeCallbackWithFallback(scoped, 'beforeLabel', _this32, context)));
14908
- pushOrConcat(bodyItem.lines, invokeCallbackWithFallback(scoped, 'label', _this32, context));
14909
- pushOrConcat(bodyItem.after, splitNewlines(invokeCallbackWithFallback(scoped, 'afterLabel', _this32, context)));
14919
+ pushOrConcat(bodyItem.before, splitNewlines(invokeCallbackWithFallback(scoped, 'beforeLabel', _this30, context)));
14920
+ pushOrConcat(bodyItem.lines, invokeCallbackWithFallback(scoped, 'label', _this30, context));
14921
+ pushOrConcat(bodyItem.after, splitNewlines(invokeCallbackWithFallback(scoped, 'afterLabel', _this30, context)));
14910
14922
  bodyItems.push(bodyItem);
14911
14923
  });
14912
14924
  return bodyItems;
@@ -14932,7 +14944,7 @@
14932
14944
  }, {
14933
14945
  key: "_createItems",
14934
14946
  value: function _createItems(options) {
14935
- var _this33 = this;
14947
+ var _this31 = this;
14936
14948
  var active = this._active;
14937
14949
  var data = this.chart.data;
14938
14950
  var labelColors = [];
@@ -14955,9 +14967,9 @@
14955
14967
  }
14956
14968
  each(tooltipItems, function (context) {
14957
14969
  var scoped = overrideCallbacks(options.callbacks, context);
14958
- labelColors.push(invokeCallbackWithFallback(scoped, 'labelColor', _this33, context));
14959
- labelPointStyles.push(invokeCallbackWithFallback(scoped, 'labelPointStyle', _this33, context));
14960
- labelTextColors.push(invokeCallbackWithFallback(scoped, 'labelTextColor', _this33, context));
14970
+ labelColors.push(invokeCallbackWithFallback(scoped, 'labelColor', _this31, context));
14971
+ labelPointStyles.push(invokeCallbackWithFallback(scoped, 'labelPointStyle', _this31, context));
14972
+ labelTextColors.push(invokeCallbackWithFallback(scoped, 'labelTextColor', _this31, context));
14961
14973
  });
14962
14974
  this.labelColors = labelColors;
14963
14975
  this.labelPointStyles = labelPointStyles;
@@ -15364,12 +15376,12 @@
15364
15376
  }, {
15365
15377
  key: "setActiveElements",
15366
15378
  value: function setActiveElements(activeElements, eventPosition) {
15367
- var _this34 = this;
15379
+ var _this32 = this;
15368
15380
  var lastActive = this._active;
15369
- var active = activeElements.map(function (_ref11) {
15370
- var datasetIndex = _ref11.datasetIndex,
15371
- index = _ref11.index;
15372
- var meta = _this34.chart.getDatasetMeta(datasetIndex);
15381
+ var active = activeElements.map(function (_ref1) {
15382
+ var datasetIndex = _ref1.datasetIndex,
15383
+ index = _ref1.index;
15384
+ var meta = _this32.chart.getDatasetMeta(datasetIndex);
15373
15385
  if (!meta) {
15374
15386
  throw new Error('Cannot find a dataset at index ' + datasetIndex);
15375
15387
  }
@@ -15416,14 +15428,14 @@
15416
15428
  }, {
15417
15429
  key: "_getActiveElements",
15418
15430
  value: function _getActiveElements(e, lastActive, replay, inChartArea) {
15419
- var _this35 = this;
15431
+ var _this33 = this;
15420
15432
  var options = this.options;
15421
15433
  if (e.type === 'mouseout') {
15422
15434
  return [];
15423
15435
  }
15424
15436
  if (!inChartArea) {
15425
15437
  return lastActive.filter(function (i) {
15426
- return _this35.chart.data.datasets[i.datasetIndex] && _this35.chart.getDatasetMeta(i.datasetIndex).controller.getParsed(i.index) !== undefined;
15438
+ return _this33.chart.data.datasets[i.datasetIndex] && _this33.chart.getDatasetMeta(i.datasetIndex).controller.getParsed(i.index) !== undefined;
15427
15439
  });
15428
15440
  }
15429
15441
  var active = this.chart.getElementsAtEventForMode(e, options.mode, options, replay);
@@ -15608,13 +15620,13 @@
15608
15620
  }
15609
15621
  var CategoryScale = /*#__PURE__*/function (_Scale) {
15610
15622
  function CategoryScale(cfg) {
15611
- var _this36;
15623
+ var _this34;
15612
15624
  _classCallCheck$1(this, CategoryScale);
15613
- _this36 = _callSuper(this, CategoryScale, [cfg]);
15614
- _this36._startValue = undefined;
15615
- _this36._valueRange = 0;
15616
- _this36._addedLabels = [];
15617
- return _this36;
15625
+ _this34 = _callSuper(this, CategoryScale, [cfg]);
15626
+ _this34._startValue = undefined;
15627
+ _this34._valueRange = 0;
15628
+ _this34._addedLabels = [];
15629
+ return _this34;
15618
15630
  }
15619
15631
  _inherits$1(CategoryScale, _Scale);
15620
15632
  return _createClass$1(CategoryScale, [{
@@ -15623,21 +15635,21 @@
15623
15635
  var added = this._addedLabels;
15624
15636
  if (added.length) {
15625
15637
  var labels = this.getLabels();
15626
- var _iterator27 = _createForOfIteratorHelper$1(added),
15627
- _step27;
15638
+ var _iterator25 = _createForOfIteratorHelper$1(added),
15639
+ _step25;
15628
15640
  try {
15629
- for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {
15630
- var _step27$value = _step27.value,
15631
- _index3 = _step27$value.index,
15632
- label = _step27$value.label;
15641
+ for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
15642
+ var _step25$value = _step25.value,
15643
+ _index3 = _step25$value.index,
15644
+ label = _step25$value.label;
15633
15645
  if (labels[_index3] === label) {
15634
15646
  labels.splice(_index3, 1);
15635
15647
  }
15636
15648
  }
15637
15649
  } catch (err) {
15638
- _iterator27.e(err);
15650
+ _iterator25.e(err);
15639
15651
  } finally {
15640
- _iterator27.f();
15652
+ _iterator25.f();
15641
15653
  }
15642
15654
  this._addedLabels = [];
15643
15655
  }
@@ -15845,9 +15857,9 @@
15845
15857
  }
15846
15858
  return ticks;
15847
15859
  }
15848
- function relativeLabelSize(value, minSpacing, _ref12) {
15849
- var horizontal = _ref12.horizontal,
15850
- minRotation = _ref12.minRotation;
15860
+ function relativeLabelSize(value, minSpacing, _ref10) {
15861
+ var horizontal = _ref10.horizontal,
15862
+ minRotation = _ref10.minRotation;
15851
15863
  var rad = toRadians(minRotation);
15852
15864
  var ratio = (horizontal ? Math.sin(rad) : Math.cos(rad)) || 0.001;
15853
15865
  var length = 0.75 * minSpacing * ('' + value).length;
@@ -15855,15 +15867,15 @@
15855
15867
  }
15856
15868
  var LinearScaleBase = /*#__PURE__*/function (_Scale2) {
15857
15869
  function LinearScaleBase(cfg) {
15858
- var _this37;
15870
+ var _this35;
15859
15871
  _classCallCheck$1(this, LinearScaleBase);
15860
- _this37 = _callSuper(this, LinearScaleBase, [cfg]);
15861
- _this37.start = undefined;
15862
- _this37.end = undefined;
15863
- _this37._startValue = undefined;
15864
- _this37._endValue = undefined;
15865
- _this37._valueRange = 0;
15866
- return _this37;
15872
+ _this35 = _callSuper(this, LinearScaleBase, [cfg]);
15873
+ _this35.start = undefined;
15874
+ _this35.end = undefined;
15875
+ _this35._startValue = undefined;
15876
+ _this35._endValue = undefined;
15877
+ _this35._valueRange = 0;
15878
+ return _this35;
15867
15879
  }
15868
15880
  _inherits$1(LinearScaleBase, _Scale2);
15869
15881
  return _createClass$1(LinearScaleBase, [{
@@ -16067,9 +16079,9 @@
16067
16079
  }
16068
16080
  return Math.min(rangeExp, log10Floor(min));
16069
16081
  }
16070
- function generateTicks(generationOptions, _ref13) {
16071
- var min = _ref13.min,
16072
- max = _ref13.max;
16082
+ function generateTicks(generationOptions, _ref11) {
16083
+ var min = _ref11.min,
16084
+ max = _ref11.max;
16073
16085
  min = finiteOrDefault(generationOptions.min, min);
16074
16086
  var ticks = [];
16075
16087
  var minExp = log10Floor(min);
@@ -16109,14 +16121,14 @@
16109
16121
  }
16110
16122
  var LogarithmicScale = /*#__PURE__*/function (_Scale3) {
16111
16123
  function LogarithmicScale(cfg) {
16112
- var _this38;
16124
+ var _this36;
16113
16125
  _classCallCheck$1(this, LogarithmicScale);
16114
- _this38 = _callSuper(this, LogarithmicScale, [cfg]);
16115
- _this38.start = undefined;
16116
- _this38.end = undefined;
16117
- _this38._startValue = undefined;
16118
- _this38._valueRange = 0;
16119
- return _this38;
16126
+ _this36 = _callSuper(this, LogarithmicScale, [cfg]);
16127
+ _this36.start = undefined;
16128
+ _this36.end = undefined;
16129
+ _this36._startValue = undefined;
16130
+ _this36._valueRange = 0;
16131
+ return _this36;
16120
16132
  }
16121
16133
  _inherits$1(LogarithmicScale, _Scale3);
16122
16134
  return _createClass$1(LogarithmicScale, [{
@@ -16509,15 +16521,15 @@
16509
16521
  }
16510
16522
  var RadialLinearScale = /*#__PURE__*/function (_LinearScaleBase2) {
16511
16523
  function RadialLinearScale(cfg) {
16512
- var _this39;
16524
+ var _this37;
16513
16525
  _classCallCheck$1(this, RadialLinearScale);
16514
- _this39 = _callSuper(this, RadialLinearScale, [cfg]);
16515
- _this39.xCenter = undefined;
16516
- _this39.yCenter = undefined;
16517
- _this39.drawingArea = undefined;
16518
- _this39._pointLabels = [];
16519
- _this39._pointLabelItems = [];
16520
- return _this39;
16526
+ _this37 = _callSuper(this, RadialLinearScale, [cfg]);
16527
+ _this37.xCenter = undefined;
16528
+ _this37.yCenter = undefined;
16529
+ _this37.drawingArea = undefined;
16530
+ _this37._pointLabels = [];
16531
+ _this37._pointLabelItems = [];
16532
+ return _this37;
16521
16533
  }
16522
16534
  _inherits$1(RadialLinearScale, _LinearScaleBase2);
16523
16535
  return _createClass$1(RadialLinearScale, [{
@@ -16548,13 +16560,13 @@
16548
16560
  }, {
16549
16561
  key: "generateTickLabels",
16550
16562
  value: function generateTickLabels(ticks) {
16551
- var _this40 = this;
16563
+ var _this38 = this;
16552
16564
  LinearScaleBase.prototype.generateTickLabels.call(this, ticks);
16553
16565
  this._pointLabels = this.getLabels().map(function (value, index) {
16554
- var label = callback(_this40.options.pointLabels.callback, [value, index], _this40);
16566
+ var label = callback(_this38.options.pointLabels.callback, [value, index], _this38);
16555
16567
  return label || label === 0 ? label : '';
16556
16568
  }).filter(function (v, i) {
16557
- return _this40.chart.getDataVisibility(i);
16569
+ return _this38.chart.getDataVisibility(i);
16558
16570
  });
16559
16571
  }
16560
16572
  }, {
@@ -16650,9 +16662,9 @@
16650
16662
  }, {
16651
16663
  key: "drawBackground",
16652
16664
  value: function drawBackground() {
16653
- var _this$options16 = this.options,
16654
- backgroundColor = _this$options16.backgroundColor,
16655
- circular = _this$options16.grid.circular;
16665
+ var _this$options14 = this.options,
16666
+ backgroundColor = _this$options14.backgroundColor,
16667
+ circular = _this$options14.grid.circular;
16656
16668
  if (backgroundColor) {
16657
16669
  var ctx = this.ctx;
16658
16670
  ctx.save();
@@ -16667,7 +16679,7 @@
16667
16679
  }, {
16668
16680
  key: "drawGrid",
16669
16681
  value: function drawGrid() {
16670
- var _this41 = this;
16682
+ var _this39 = this;
16671
16683
  var ctx = this.ctx;
16672
16684
  var opts = this.options;
16673
16685
  var angleLines = opts.angleLines,
@@ -16680,12 +16692,12 @@
16680
16692
  }
16681
16693
  if (grid.display) {
16682
16694
  this.ticks.forEach(function (tick, index) {
16683
- if (index !== 0 || index === 0 && _this41.min < 0) {
16684
- offset = _this41.getDistanceFromCenterForValue(tick.value);
16685
- var context = _this41.getContext(index);
16695
+ if (index !== 0 || index === 0 && _this39.min < 0) {
16696
+ offset = _this39.getDistanceFromCenterForValue(tick.value);
16697
+ var context = _this39.getContext(index);
16686
16698
  var optsAtIndex = grid.setContext(context);
16687
16699
  var optsAtIndexBorder = border.setContext(context);
16688
- drawRadiusLine(_this41, optsAtIndex, offset, labelCount, optsAtIndexBorder);
16700
+ drawRadiusLine(_this39, optsAtIndex, offset, labelCount, optsAtIndexBorder);
16689
16701
  }
16690
16702
  });
16691
16703
  }
@@ -16718,7 +16730,7 @@
16718
16730
  }, {
16719
16731
  key: "drawLabels",
16720
16732
  value: function drawLabels() {
16721
- var _this42 = this;
16733
+ var _this40 = this;
16722
16734
  var ctx = this.ctx;
16723
16735
  var opts = this.options;
16724
16736
  var tickOpts = opts.ticks;
@@ -16733,12 +16745,12 @@
16733
16745
  ctx.textAlign = 'center';
16734
16746
  ctx.textBaseline = 'middle';
16735
16747
  this.ticks.forEach(function (tick, index) {
16736
- if (index === 0 && _this42.min >= 0 && !opts.reverse) {
16748
+ if (index === 0 && _this40.min >= 0 && !opts.reverse) {
16737
16749
  return;
16738
16750
  }
16739
- var optsAtIndex = tickOpts.setContext(_this42.getContext(index));
16751
+ var optsAtIndex = tickOpts.setContext(_this40.getContext(index));
16740
16752
  var tickFont = toFont(optsAtIndex.font);
16741
- offset = _this42.getDistanceFromCenterForValue(_this42.ticks[index].value);
16753
+ offset = _this40.getDistanceFromCenterForValue(_this40.ticks[index].value);
16742
16754
  if (optsAtIndex.showLabelBackdrop) {
16743
16755
  ctx.font = tickFont.string;
16744
16756
  width = ctx.measureText(tick.label).width;
@@ -16944,20 +16956,20 @@
16944
16956
  }
16945
16957
  var TimeScale = /*#__PURE__*/function (_Scale4) {
16946
16958
  function TimeScale(props) {
16947
- var _this43;
16959
+ var _this41;
16948
16960
  _classCallCheck$1(this, TimeScale);
16949
- _this43 = _callSuper(this, TimeScale, [props]);
16950
- _this43._cache = {
16961
+ _this41 = _callSuper(this, TimeScale, [props]);
16962
+ _this41._cache = {
16951
16963
  data: [],
16952
16964
  labels: [],
16953
16965
  all: []
16954
16966
  };
16955
- _this43._unit = 'day';
16956
- _this43._majorUnit = undefined;
16957
- _this43._offsets = {};
16958
- _this43._normalized = false;
16959
- _this43._parseOpts = undefined;
16960
- return _this43;
16967
+ _this41._unit = 'day';
16968
+ _this41._majorUnit = undefined;
16969
+ _this41._offsets = {};
16970
+ _this41._normalized = false;
16971
+ _this41._parseOpts = undefined;
16972
+ return _this41;
16961
16973
  }
16962
16974
  _inherits$1(TimeScale, _Scale4);
16963
16975
  return _createClass$1(TimeScale, [{
@@ -17314,13 +17326,13 @@
17314
17326
  }
17315
17327
  var TimeSeriesScale = /*#__PURE__*/function (_TimeScale2) {
17316
17328
  function TimeSeriesScale(props) {
17317
- var _this44;
17329
+ var _this42;
17318
17330
  _classCallCheck$1(this, TimeSeriesScale);
17319
- _this44 = _callSuper(this, TimeSeriesScale, [props]);
17320
- _this44._table = [];
17321
- _this44._minPos = undefined;
17322
- _this44._tableRange = undefined;
17323
- return _this44;
17331
+ _this42 = _callSuper(this, TimeSeriesScale, [props]);
17332
+ _this42._table = [];
17333
+ _this42._minPos = undefined;
17334
+ _this42._tableRange = undefined;
17335
+ return _this42;
17324
17336
  }
17325
17337
  _inherits$1(TimeSeriesScale, _TimeScale2);
17326
17338
  return _createClass$1(TimeSeriesScale, [{