chartkick 5.0.6 → 5.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3990dc8d7dcc12779a0fa7e69be8cc56c36268181a7120cec044a1c6cd78599f
4
- data.tar.gz: fec488a8e79f43e10e572239aaf19b0886cbd03e4d6931dca4155ebb6ef5be45
3
+ metadata.gz: c8ea7295b63b2df96ea5fe08f39797968f690402e3aa586427ed2c0f62bcf5c9
4
+ data.tar.gz: d30b2dbba45bf08b834f1cee99d53dd620bfbc21d9c6fc4382057b06b69daf5b
5
5
  SHA512:
6
- metadata.gz: d926ace8a238d9a41f901a9f626c93678c66e7a8e2087178b06db8a253cc160c8bc74b18580049d58619730b0893b21e2f6ebfc922933b336d9a472eb71cf456
7
- data.tar.gz: 8012187958af8bb1070d7c9e645f6b20252ede8a3341e23b8d7a0eacf6b9afd342db9c1e8951bfdecf2b9ddcf5dae90948df06ff792e94a3859be253dc885029
6
+ metadata.gz: 2b74e4dcbf80c7f03985f879738731b54aec995ea18b2bcfd2cf4c14865dff05a34f7cb316741099834bb92f90d4df8aa3b59a7831d2e2812a0a08a4661f7566
7
+ data.tar.gz: be96958ccf4735188db8372b5b4b9762ae6f2d48620c237ff84179e3a8d38a7dc2f077ed197cf5656b2450f6862ec59d7149b2ff0f46f8c72a578333a42fcb1c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 5.0.7 (2024-05-21)
2
+
3
+ - Updated Chart.js to 4.4.3
4
+
1
5
  ## 5.0.6 (2024-02-28)
2
6
 
3
7
  - Updated Chart.js to 4.4.2
@@ -1,3 +1,3 @@
1
1
  module Chartkick
2
- VERSION = "5.0.6"
2
+ VERSION = "5.0.7"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chart.js v4.4.2
2
+ * Chart.js v4.4.3
3
3
  * https://www.chartjs.org
4
4
  * (c) 2024 Chart.js Contributors
5
5
  * Released under the MIT License
@@ -26,6 +26,17 @@
26
26
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Chart = factory());
27
27
  })(this, (function () { 'use strict';
28
28
 
29
+ function _callSuper(t, o, e) {
30
+ return o = _getPrototypeOf$1(o), _possibleConstructorReturn$1(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf$1(t).constructor) : o.apply(t, e));
31
+ }
32
+ function _isNativeReflectConstruct$1() {
33
+ try {
34
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
35
+ } catch (t) {}
36
+ return (_isNativeReflectConstruct$1 = function () {
37
+ return !!t;
38
+ })();
39
+ }
29
40
  function _iterableToArrayLimit(r, l) {
30
41
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
31
42
  if (null != t) {
@@ -74,6 +85,20 @@
74
85
  }
75
86
  return e;
76
87
  }
88
+ function _toPrimitive(t, r) {
89
+ if ("object" != typeof t || !t) return t;
90
+ var e = t[Symbol.toPrimitive];
91
+ if (void 0 !== e) {
92
+ var i = e.call(t, r || "default");
93
+ if ("object" != typeof i) return i;
94
+ throw new TypeError("@@toPrimitive must return a primitive value.");
95
+ }
96
+ return ("string" === r ? String : Number)(t);
97
+ }
98
+ function _toPropertyKey(t) {
99
+ var i = _toPrimitive(t, "string");
100
+ return "symbol" == typeof i ? i : i + "";
101
+ }
77
102
  function _typeof$1(o) {
78
103
  "@babel/helpers - typeof";
79
104
 
@@ -94,7 +119,7 @@
94
119
  descriptor.enumerable = descriptor.enumerable || false;
95
120
  descriptor.configurable = true;
96
121
  if ("value" in descriptor) descriptor.writable = true;
97
- Object.defineProperty(target, _toPropertyKey$1(descriptor.key), descriptor);
122
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
98
123
  }
99
124
  }
100
125
  function _createClass$1(Constructor, protoProps, staticProps) {
@@ -106,7 +131,7 @@
106
131
  return Constructor;
107
132
  }
108
133
  function _defineProperty$1(obj, key, value) {
109
- key = _toPropertyKey$1(key);
134
+ key = _toPropertyKey(key);
110
135
  if (key in obj) {
111
136
  Object.defineProperty(obj, key, {
112
137
  value: value,
@@ -148,17 +173,6 @@
148
173
  };
149
174
  return _setPrototypeOf$1(o, p);
150
175
  }
151
- function _isNativeReflectConstruct$1() {
152
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
153
- if (Reflect.construct.sham) return false;
154
- if (typeof Proxy === "function") return true;
155
- try {
156
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
157
- return true;
158
- } catch (e) {
159
- return false;
160
- }
161
- }
162
176
  function _assertThisInitialized$1(self) {
163
177
  if (self === void 0) {
164
178
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
@@ -173,20 +187,6 @@
173
187
  }
174
188
  return _assertThisInitialized$1(self);
175
189
  }
176
- function _createSuper$1(Derived) {
177
- var hasNativeReflectConstruct = _isNativeReflectConstruct$1();
178
- return function _createSuperInternal() {
179
- var Super = _getPrototypeOf$1(Derived),
180
- result;
181
- if (hasNativeReflectConstruct) {
182
- var NewTarget = _getPrototypeOf$1(this).constructor;
183
- result = Reflect.construct(Super, arguments, NewTarget);
184
- } else {
185
- result = Super.apply(this, arguments);
186
- }
187
- return _possibleConstructorReturn$1(this, result);
188
- };
189
- }
190
190
  function _superPropBase(object, property) {
191
191
  while (!Object.prototype.hasOwnProperty.call(object, property)) {
192
192
  object = _getPrototypeOf$1(object);
@@ -295,20 +295,6 @@
295
295
  }
296
296
  };
297
297
  }
298
- function _toPrimitive$1(input, hint) {
299
- if (typeof input !== "object" || input === null) return input;
300
- var prim = input[Symbol.toPrimitive];
301
- if (prim !== undefined) {
302
- var res = prim.call(input, hint || "default");
303
- if (typeof res !== "object") return res;
304
- throw new TypeError("@@toPrimitive must return a primitive value.");
305
- }
306
- return (hint === "string" ? String : Number)(input);
307
- }
308
- function _toPropertyKey$1(arg) {
309
- var key = _toPrimitive$1(arg, "string");
310
- return typeof key === "symbol" ? key : String(key);
311
- }
312
298
 
313
299
  /*!
314
300
  * @kurkle/color v0.3.2
@@ -835,7 +821,7 @@
835
821
  this._rgb = v;
836
822
  this._valid = !!v;
837
823
  }
838
- _createClass$1(Color, [{
824
+ return _createClass$1(Color, [{
839
825
  key: "valid",
840
826
  get: function get() {
841
827
  return this._valid;
@@ -968,7 +954,6 @@
968
954
  return this;
969
955
  }
970
956
  }]);
971
- return Color;
972
957
  }();
973
958
 
974
959
  /**
@@ -2170,7 +2155,7 @@
2170
2155
  this.describe(_descriptors);
2171
2156
  this.apply(_appliers);
2172
2157
  }
2173
- _createClass$1(Defaults, [{
2158
+ return _createClass$1(Defaults, [{
2174
2159
  key: "set",
2175
2160
  value: function set(scope, values) {
2176
2161
  return _set(this, scope, values);
@@ -2223,7 +2208,6 @@
2223
2208
  });
2224
2209
  }
2225
2210
  }]);
2226
- return Defaults;
2227
2211
  }();
2228
2212
  var defaults = /* #__PURE__ */new Defaults({
2229
2213
  _scriptable: function _scriptable(name) {
@@ -2328,6 +2312,9 @@
2328
2312
  * Clears the entire canvas.
2329
2313
  */
2330
2314
  function clearCanvas(canvas, ctx) {
2315
+ if (!ctx && !canvas) {
2316
+ return;
2317
+ }
2331
2318
  ctx = ctx || canvas.getContext('2d');
2332
2319
  ctx.save();
2333
2320
  // canvas.width and canvas.height do not consider the canvas transform,
@@ -2996,7 +2983,7 @@
2996
2983
  return isObject(value) && prop !== 'adapters' && (Object.getPrototypeOf(value) === null || value.constructor === Object);
2997
2984
  };
2998
2985
  function _cached(target, prop, resolve) {
2999
- if (Object.prototype.hasOwnProperty.call(target, prop)) {
2986
+ if (Object.prototype.hasOwnProperty.call(target, prop) || prop === 'constructor') {
3000
2987
  return target[prop];
3001
2988
  }
3002
2989
  var value = resolve();
@@ -3529,7 +3516,7 @@
3529
3516
  function getContainerSize(canvas, width, height) {
3530
3517
  var maxWidth, maxHeight;
3531
3518
  if (width === undefined || height === undefined) {
3532
- var container = _getParentNode(canvas);
3519
+ var container = canvas && _getParentNode(canvas);
3533
3520
  if (!container) {
3534
3521
  width = canvas.clientWidth;
3535
3522
  height = canvas.clientHeight;
@@ -4087,7 +4074,7 @@
4087
4074
  this._running = false;
4088
4075
  this._lastDate = undefined;
4089
4076
  }
4090
- _createClass$1(Animator, [{
4077
+ return _createClass$1(Animator, [{
4091
4078
  key: "_notify",
4092
4079
  value: function _notify(chart, anims, date, type) {
4093
4080
  var callbacks = anims.listeners[type];
@@ -4245,7 +4232,6 @@
4245
4232
  return this._charts["delete"](chart);
4246
4233
  }
4247
4234
  }]);
4248
- return Animator;
4249
4235
  }();
4250
4236
  var animator = /* #__PURE__ */new Animator();
4251
4237
  var transparent = 'transparent';
@@ -4280,7 +4266,7 @@
4280
4266
  this._to = to;
4281
4267
  this._promises = undefined;
4282
4268
  }
4283
- _createClass$1(Animation, [{
4269
+ return _createClass$1(Animation, [{
4284
4270
  key: "active",
4285
4271
  value: function active() {
4286
4272
  return this._active;
@@ -4356,7 +4342,6 @@
4356
4342
  }
4357
4343
  }
4358
4344
  }]);
4359
- return Animation;
4360
4345
  }();
4361
4346
  var Animations = /*#__PURE__*/function () {
4362
4347
  function Animations(chart, config) {
@@ -4365,7 +4350,7 @@
4365
4350
  this._properties = new Map();
4366
4351
  this.configure(config);
4367
4352
  }
4368
- _createClass$1(Animations, [{
4353
+ return _createClass$1(Animations, [{
4369
4354
  key: "configure",
4370
4355
  value: function configure(config) {
4371
4356
  if (!isObject(config)) {
@@ -4458,7 +4443,6 @@
4458
4443
  }
4459
4444
  }
4460
4445
  }]);
4461
- return Animations;
4462
4446
  }();
4463
4447
  function awaitAll(animations, properties) {
4464
4448
  var running = [];
@@ -4561,16 +4545,17 @@
4561
4545
  }
4562
4546
  return value;
4563
4547
  }
4564
- function convertObjectDataToArray(data) {
4548
+ function convertObjectDataToArray(data, meta) {
4549
+ var iScale = meta.iScale,
4550
+ vScale = meta.vScale;
4551
+ var iAxisKey = iScale.axis === 'x' ? 'x' : 'y';
4552
+ var vAxisKey = vScale.axis === 'x' ? 'x' : 'y';
4565
4553
  var keys = Object.keys(data);
4566
4554
  var adata = new Array(keys.length);
4567
4555
  var i, ilen, key;
4568
4556
  for (i = 0, ilen = keys.length; i < ilen; ++i) {
4569
4557
  key = keys[i];
4570
- adata[i] = {
4571
- x: key,
4572
- y: data[key]
4573
- };
4558
+ adata[i] = _defineProperty$1(_defineProperty$1({}, iAxisKey, key), vAxisKey, data[key]);
4574
4559
  }
4575
4560
  return adata;
4576
4561
  }
@@ -4730,7 +4715,7 @@
4730
4715
  this.dataElementType = (this instanceof DatasetController ? this.constructor : void 0).dataElementType;
4731
4716
  this.initialize();
4732
4717
  }
4733
- _createClass$1(DatasetController, [{
4718
+ return _createClass$1(DatasetController, [{
4734
4719
  key: "initialize",
4735
4720
  value: function initialize() {
4736
4721
  var meta = this._cachedMeta;
@@ -4815,13 +4800,14 @@
4815
4800
  var data = dataset.data || (dataset.data = []);
4816
4801
  var _data = this._data;
4817
4802
  if (isObject(data)) {
4818
- this._data = convertObjectDataToArray(data);
4803
+ var meta = this._cachedMeta;
4804
+ this._data = convertObjectDataToArray(data, meta);
4819
4805
  } else if (_data !== data) {
4820
4806
  if (_data) {
4821
4807
  unlistenArrayEvents(_data, this);
4822
- var meta = this._cachedMeta;
4823
- clearStacks(meta);
4824
- meta._parsed = [];
4808
+ var _meta = this._cachedMeta;
4809
+ clearStacks(_meta);
4810
+ _meta._parsed = [];
4825
4811
  }
4826
4812
  if (data && Object.isExtensible(data)) {
4827
4813
  listenArrayEvents(data, this);
@@ -5402,7 +5388,6 @@
5402
5388
  this._sync(['_insertElements', 0, arguments.length]);
5403
5389
  }
5404
5390
  }]);
5405
- return DatasetController;
5406
5391
  }();
5407
5392
  _defineProperty$1(DatasetController, "defaults", {});
5408
5393
  _defineProperty$1(DatasetController, "datasetElementType", null);
@@ -5615,14 +5600,13 @@
5615
5600
  var inflateAmount = _ref.inflateAmount;
5616
5601
  properties.inflateAmount = inflateAmount === 'auto' ? ratio === 1 ? 0.33 : 0 : inflateAmount;
5617
5602
  }
5618
- var BarController = /*#__PURE__*/function (_DatasetController) {
5619
- _inherits$1(BarController, _DatasetController);
5620
- var _super = _createSuper$1(BarController);
5603
+ var BarController = /*#__PURE__*/function (_DatasetController2) {
5621
5604
  function BarController() {
5622
5605
  _classCallCheck$1(this, BarController);
5623
- return _super.apply(this, arguments);
5606
+ return _callSuper(this, BarController, arguments);
5624
5607
  }
5625
- _createClass$1(BarController, [{
5608
+ _inherits$1(BarController, _DatasetController2);
5609
+ return _createClass$1(BarController, [{
5626
5610
  key: "parsePrimitiveData",
5627
5611
  value: function parsePrimitiveData(meta, data, start, count) {
5628
5612
  return parseArrayOrPrimitive(meta, data, start, count);
@@ -5911,13 +5895,12 @@
5911
5895
  var ilen = rects.length;
5912
5896
  var i = 0;
5913
5897
  for (; i < ilen; ++i) {
5914
- if (this.getParsed(i)[vScale.axis] !== null) {
5898
+ if (this.getParsed(i)[vScale.axis] !== null && !rects[i].hidden) {
5915
5899
  rects[i].draw(this._ctx);
5916
5900
  }
5917
5901
  }
5918
5902
  }
5919
5903
  }]);
5920
- return BarController;
5921
5904
  }(DatasetController);
5922
5905
  _defineProperty$1(BarController, "id", 'bar');
5923
5906
  _defineProperty$1(BarController, "defaults", {
@@ -5948,14 +5931,13 @@
5948
5931
  }
5949
5932
  }
5950
5933
  });
5951
- var BubbleController = /*#__PURE__*/function (_DatasetController2) {
5952
- _inherits$1(BubbleController, _DatasetController2);
5953
- var _super2 = _createSuper$1(BubbleController);
5934
+ var BubbleController = /*#__PURE__*/function (_DatasetController3) {
5954
5935
  function BubbleController() {
5955
5936
  _classCallCheck$1(this, BubbleController);
5956
- return _super2.apply(this, arguments);
5937
+ return _callSuper(this, BubbleController, arguments);
5957
5938
  }
5958
- _createClass$1(BubbleController, [{
5939
+ _inherits$1(BubbleController, _DatasetController3);
5940
+ return _createClass$1(BubbleController, [{
5959
5941
  key: "initialize",
5960
5942
  value: function initialize() {
5961
5943
  this.enableOptionSharing = true;
@@ -6068,7 +6050,6 @@
6068
6050
  return values;
6069
6051
  }
6070
6052
  }]);
6071
- return BubbleController;
6072
6053
  }(DatasetController);
6073
6054
  _defineProperty$1(BubbleController, "id", 'bubble');
6074
6055
  _defineProperty$1(BubbleController, "defaults", {
@@ -6125,13 +6106,11 @@
6125
6106
  offsetY: offsetY
6126
6107
  };
6127
6108
  }
6128
- var DoughnutController = /*#__PURE__*/function (_DatasetController3) {
6129
- _inherits$1(DoughnutController, _DatasetController3);
6130
- var _super3 = _createSuper$1(DoughnutController);
6109
+ var DoughnutController = /*#__PURE__*/function (_DatasetController4) {
6131
6110
  function DoughnutController(chart, datasetIndex) {
6132
6111
  var _this4;
6133
6112
  _classCallCheck$1(this, DoughnutController);
6134
- _this4 = _super3.call(this, chart, datasetIndex);
6113
+ _this4 = _callSuper(this, DoughnutController, [chart, datasetIndex]);
6135
6114
  _this4.enableOptionSharing = true;
6136
6115
  _this4.innerRadius = undefined;
6137
6116
  _this4.outerRadius = undefined;
@@ -6139,7 +6118,8 @@
6139
6118
  _this4.offsetY = undefined;
6140
6119
  return _this4;
6141
6120
  }
6142
- _createClass$1(DoughnutController, [{
6121
+ _inherits$1(DoughnutController, _DatasetController4);
6122
+ return _createClass$1(DoughnutController, [{
6143
6123
  key: "linkScales",
6144
6124
  value: function linkScales() {}
6145
6125
  }, {
@@ -6373,7 +6353,6 @@
6373
6353
  return this._getRingWeightOffset(this.chart.data.datasets.length) || 1;
6374
6354
  }
6375
6355
  }]);
6376
- return DoughnutController;
6377
6356
  }(DatasetController);
6378
6357
  _defineProperty$1(DoughnutController, "id", 'doughnut');
6379
6358
  _defineProperty$1(DoughnutController, "defaults", {
@@ -6440,14 +6419,13 @@
6440
6419
  }
6441
6420
  }
6442
6421
  });
6443
- var LineController = /*#__PURE__*/function (_DatasetController4) {
6444
- _inherits$1(LineController, _DatasetController4);
6445
- var _super4 = _createSuper$1(LineController);
6422
+ var LineController = /*#__PURE__*/function (_DatasetController5) {
6446
6423
  function LineController() {
6447
6424
  _classCallCheck$1(this, LineController);
6448
- return _super4.apply(this, arguments);
6425
+ return _callSuper(this, LineController, arguments);
6449
6426
  }
6450
- _createClass$1(LineController, [{
6427
+ _inherits$1(LineController, _DatasetController5);
6428
+ return _createClass$1(LineController, [{
6451
6429
  key: "initialize",
6452
6430
  value: function initialize() {
6453
6431
  this.enableOptionSharing = true;
@@ -6557,7 +6535,6 @@
6557
6535
  _get(_getPrototypeOf$1(LineController.prototype), "draw", this).call(this);
6558
6536
  }
6559
6537
  }]);
6560
- return LineController;
6561
6538
  }(DatasetController);
6562
6539
  _defineProperty$1(LineController, "id", 'line');
6563
6540
  _defineProperty$1(LineController, "defaults", {
@@ -6576,18 +6553,17 @@
6576
6553
  }
6577
6554
  }
6578
6555
  });
6579
- var PolarAreaController = /*#__PURE__*/function (_DatasetController5) {
6580
- _inherits$1(PolarAreaController, _DatasetController5);
6581
- var _super5 = _createSuper$1(PolarAreaController);
6556
+ var PolarAreaController = /*#__PURE__*/function (_DatasetController6) {
6582
6557
  function PolarAreaController(chart, datasetIndex) {
6583
6558
  var _this5;
6584
6559
  _classCallCheck$1(this, PolarAreaController);
6585
- _this5 = _super5.call(this, chart, datasetIndex);
6560
+ _this5 = _callSuper(this, PolarAreaController, [chart, datasetIndex]);
6586
6561
  _this5.innerRadius = undefined;
6587
6562
  _this5.outerRadius = undefined;
6588
6563
  return _this5;
6589
6564
  }
6590
- _createClass$1(PolarAreaController, [{
6565
+ _inherits$1(PolarAreaController, _DatasetController6);
6566
+ return _createClass$1(PolarAreaController, [{
6591
6567
  key: "getLabelAndValue",
6592
6568
  value: function getLabelAndValue(index) {
6593
6569
  var meta = this._cachedMeta;
@@ -6708,7 +6684,6 @@
6708
6684
  return this.chart.getDataVisibility(index) ? toRadians(this.resolveDataElementOptions(index, mode).angle || defaultAngle) : 0;
6709
6685
  }
6710
6686
  }]);
6711
- return PolarAreaController;
6712
6687
  }(DatasetController);
6713
6688
  _defineProperty$1(PolarAreaController, "id", 'polarArea');
6714
6689
  _defineProperty$1(PolarAreaController, "defaults", {
@@ -6778,13 +6753,12 @@
6778
6753
  }
6779
6754
  }
6780
6755
  });
6781
- var PieController = /*#__PURE__*/function (_DoughnutController) {
6782
- _inherits$1(PieController, _DoughnutController);
6783
- var _super6 = _createSuper$1(PieController);
6756
+ var PieController = /*#__PURE__*/function (_DoughnutController2) {
6784
6757
  function PieController() {
6785
6758
  _classCallCheck$1(this, PieController);
6786
- return _super6.apply(this, arguments);
6759
+ return _callSuper(this, PieController, arguments);
6787
6760
  }
6761
+ _inherits$1(PieController, _DoughnutController2);
6788
6762
  return _createClass$1(PieController);
6789
6763
  }(DoughnutController);
6790
6764
  _defineProperty$1(PieController, "id", 'pie');
@@ -6794,14 +6768,13 @@
6794
6768
  circumference: 360,
6795
6769
  radius: '100%'
6796
6770
  });
6797
- var RadarController = /*#__PURE__*/function (_DatasetController6) {
6798
- _inherits$1(RadarController, _DatasetController6);
6799
- var _super7 = _createSuper$1(RadarController);
6771
+ var RadarController = /*#__PURE__*/function (_DatasetController7) {
6800
6772
  function RadarController() {
6801
6773
  _classCallCheck$1(this, RadarController);
6802
- return _super7.apply(this, arguments);
6774
+ return _callSuper(this, RadarController, arguments);
6803
6775
  }
6804
- _createClass$1(RadarController, [{
6776
+ _inherits$1(RadarController, _DatasetController7);
6777
+ return _createClass$1(RadarController, [{
6805
6778
  key: "getLabelAndValue",
6806
6779
  value: function getLabelAndValue(index) {
6807
6780
  var vScale = this._cachedMeta.vScale;
@@ -6860,7 +6833,6 @@
6860
6833
  }
6861
6834
  }
6862
6835
  }]);
6863
- return RadarController;
6864
6836
  }(DatasetController);
6865
6837
  _defineProperty$1(RadarController, "id", 'radar');
6866
6838
  _defineProperty$1(RadarController, "defaults", {
@@ -6882,14 +6854,13 @@
6882
6854
  }
6883
6855
  }
6884
6856
  });
6885
- var ScatterController = /*#__PURE__*/function (_DatasetController7) {
6886
- _inherits$1(ScatterController, _DatasetController7);
6887
- var _super8 = _createSuper$1(ScatterController);
6857
+ var ScatterController = /*#__PURE__*/function (_DatasetController8) {
6888
6858
  function ScatterController() {
6889
6859
  _classCallCheck$1(this, ScatterController);
6890
- return _super8.apply(this, arguments);
6860
+ return _callSuper(this, ScatterController, arguments);
6891
6861
  }
6892
- _createClass$1(ScatterController, [{
6862
+ _inherits$1(ScatterController, _DatasetController8);
6863
+ return _createClass$1(ScatterController, [{
6893
6864
  key: "getLabelAndValue",
6894
6865
  value: function getLabelAndValue(index) {
6895
6866
  var meta = this._cachedMeta;
@@ -7016,7 +6987,6 @@
7016
6987
  return Math.max(border, firstPoint, lastPoint) / 2;
7017
6988
  }
7018
6989
  }]);
7019
- return ScatterController;
7020
6990
  }(DatasetController);
7021
6991
  _defineProperty$1(ScatterController, "id", 'scatter');
7022
6992
  _defineProperty$1(ScatterController, "defaults", {
@@ -7071,7 +7041,7 @@
7071
7041
  this.options = options || {};
7072
7042
  }
7073
7043
  // eslint-disable-next-line @typescript-eslint/no-empty-function
7074
- _createClass$1(DateAdapterBase, [{
7044
+ return _createClass$1(DateAdapterBase, [{
7075
7045
  key: "init",
7076
7046
  value: function init() {}
7077
7047
  }, {
@@ -7126,7 +7096,6 @@
7126
7096
  Object.assign(DateAdapterBase.prototype, members);
7127
7097
  }
7128
7098
  }]);
7129
- return DateAdapterBase;
7130
7099
  }();
7131
7100
  var adapters = {
7132
7101
  _date: DateAdapterBase
@@ -7711,7 +7680,7 @@
7711
7680
  function BasePlatform() {
7712
7681
  _classCallCheck$1(this, BasePlatform);
7713
7682
  }
7714
- _createClass$1(BasePlatform, [{
7683
+ return _createClass$1(BasePlatform, [{
7715
7684
  key: "acquireContext",
7716
7685
  value: function acquireContext(canvas, aspectRatio) {}
7717
7686
  }, {
@@ -7749,16 +7718,14 @@
7749
7718
  key: "updateConfig",
7750
7719
  value: function updateConfig(config) {}
7751
7720
  }]);
7752
- return BasePlatform;
7753
7721
  }();
7754
7722
  var BasicPlatform = /*#__PURE__*/function (_BasePlatform) {
7755
- _inherits$1(BasicPlatform, _BasePlatform);
7756
- var _super9 = _createSuper$1(BasicPlatform);
7757
7723
  function BasicPlatform() {
7758
7724
  _classCallCheck$1(this, BasicPlatform);
7759
- return _super9.apply(this, arguments);
7725
+ return _callSuper(this, BasicPlatform, arguments);
7760
7726
  }
7761
- _createClass$1(BasicPlatform, [{
7727
+ _inherits$1(BasicPlatform, _BasePlatform);
7728
+ return _createClass$1(BasicPlatform, [{
7762
7729
  key: "acquireContext",
7763
7730
  value: function acquireContext(item) {
7764
7731
  return item && item.getContext && item.getContext('2d') || null;
@@ -7769,7 +7736,6 @@
7769
7736
  config.options.animation = false;
7770
7737
  }
7771
7738
  }]);
7772
- return BasicPlatform;
7773
7739
  }(BasePlatform);
7774
7740
  var EXPANDO_KEY = '$chartjs';
7775
7741
  var EVENT_TYPES = {
@@ -7988,13 +7954,12 @@
7988
7954
  return proxy;
7989
7955
  }
7990
7956
  var DomPlatform = /*#__PURE__*/function (_BasePlatform2) {
7991
- _inherits$1(DomPlatform, _BasePlatform2);
7992
- var _super10 = _createSuper$1(DomPlatform);
7993
7957
  function DomPlatform() {
7994
7958
  _classCallCheck$1(this, DomPlatform);
7995
- return _super10.apply(this, arguments);
7959
+ return _callSuper(this, DomPlatform, arguments);
7996
7960
  }
7997
- _createClass$1(DomPlatform, [{
7961
+ _inherits$1(DomPlatform, _BasePlatform2);
7962
+ return _createClass$1(DomPlatform, [{
7998
7963
  key: "acquireContext",
7999
7964
  value: function acquireContext(canvas, aspectRatio) {
8000
7965
  var context = canvas && canvas.getContext && canvas.getContext('2d');
@@ -8071,11 +8036,10 @@
8071
8036
  }, {
8072
8037
  key: "isAttached",
8073
8038
  value: function isAttached(canvas) {
8074
- var container = _getParentNode(canvas);
8039
+ var container = canvas && _getParentNode(canvas);
8075
8040
  return !!(container && container.isConnected);
8076
8041
  }
8077
8042
  }]);
8078
- return DomPlatform;
8079
8043
  }(BasePlatform);
8080
8044
  function _detectPlatform(canvas) {
8081
8045
  if (!_isDomSupported() || typeof OffscreenCanvas !== 'undefined' && canvas instanceof OffscreenCanvas) {
@@ -8092,7 +8056,7 @@
8092
8056
  _defineProperty$1(this, "options", void 0);
8093
8057
  _defineProperty$1(this, "$animations", void 0);
8094
8058
  }
8095
- _createClass$1(Element, [{
8059
+ return _createClass$1(Element, [{
8096
8060
  key: "tooltipPosition",
8097
8061
  value: function tooltipPosition(useFinalPosition) {
8098
8062
  var _this$getProps = this.getProps(['x', 'y'], useFinalPosition),
@@ -8124,7 +8088,6 @@
8124
8088
  return ret;
8125
8089
  }
8126
8090
  }]);
8127
- return Element;
8128
8091
  }();
8129
8092
  _defineProperty$1(Element, "defaults", {});
8130
8093
  _defineProperty$1(Element, "defaultRoutes", undefined);
@@ -8367,13 +8330,11 @@
8367
8330
  rotation: rotation
8368
8331
  };
8369
8332
  }
8370
- var Scale = /*#__PURE__*/function (_Element) {
8371
- _inherits$1(Scale, _Element);
8372
- var _super11 = _createSuper$1(Scale);
8333
+ var Scale = /*#__PURE__*/function (_Element2) {
8373
8334
  function Scale(cfg) {
8374
8335
  var _this9;
8375
8336
  _classCallCheck$1(this, Scale);
8376
- _this9 = _super11.call(this);
8337
+ _this9 = _callSuper(this, Scale);
8377
8338
  _this9.id = cfg.id;
8378
8339
  _this9.type = cfg.type;
8379
8340
  _this9.options = undefined;
@@ -8423,7 +8384,8 @@
8423
8384
  _this9.$context = undefined;
8424
8385
  return _this9;
8425
8386
  }
8426
- _createClass$1(Scale, [{
8387
+ _inherits$1(Scale, _Element2);
8388
+ return _createClass$1(Scale, [{
8427
8389
  key: "init",
8428
8390
  value: function init(options) {
8429
8391
  this.options = options.setContext(this.getContext());
@@ -9690,7 +9652,6 @@
9690
9652
  return (this.isHorizontal() ? this.width : this.height) / fontSize;
9691
9653
  }
9692
9654
  }]);
9693
- return Scale;
9694
9655
  }(Element);
9695
9656
  var TypedRegistry = /*#__PURE__*/function () {
9696
9657
  function TypedRegistry(type, scope, override) {
@@ -9700,7 +9661,7 @@
9700
9661
  this.override = override;
9701
9662
  this.items = Object.create(null);
9702
9663
  }
9703
- _createClass$1(TypedRegistry, [{
9664
+ return _createClass$1(TypedRegistry, [{
9704
9665
  key: "isForType",
9705
9666
  value: function isForType(type) {
9706
9667
  return Object.prototype.isPrototypeOf.call(this.type.prototype, type.prototype);
@@ -9751,7 +9712,6 @@
9751
9712
  }
9752
9713
  }
9753
9714
  }]);
9754
- return TypedRegistry;
9755
9715
  }();
9756
9716
  function registerDefaults(item, scope, parentScope) {
9757
9717
  var itemDefaults = merge(Object.create(null), [parentScope ? defaults.get(parentScope) : {}, defaults.get(scope), item.defaults]);
@@ -9786,7 +9746,7 @@
9786
9746
  this.scales = new TypedRegistry(Scale, 'scales');
9787
9747
  this._typedRegistries = [this.controllers, this.scales, this.elements];
9788
9748
  }
9789
- _createClass$1(Registry, [{
9749
+ return _createClass$1(Registry, [{
9790
9750
  key: "add",
9791
9751
  value: function add() {
9792
9752
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -9931,7 +9891,6 @@
9931
9891
  return item;
9932
9892
  }
9933
9893
  }]);
9934
- return Registry;
9935
9894
  }();
9936
9895
  var registry = /* #__PURE__ */new Registry();
9937
9896
  var PluginService = /*#__PURE__*/function () {
@@ -9939,7 +9898,7 @@
9939
9898
  _classCallCheck$1(this, PluginService);
9940
9899
  this._init = [];
9941
9900
  }
9942
- _createClass$1(PluginService, [{
9901
+ return _createClass$1(PluginService, [{
9943
9902
  key: "notify",
9944
9903
  value: function notify(chart, hook, args, filter) {
9945
9904
  if (hook === 'beforeInit') {
@@ -10019,7 +9978,6 @@
10019
9978
  this._notify(diff(descriptors, previousDescriptors), chart, 'start');
10020
9979
  }
10021
9980
  }]);
10022
- return PluginService;
10023
9981
  }();
10024
9982
  function allPlugins(config) {
10025
9983
  var localIds = {};
@@ -10241,7 +10199,7 @@
10241
10199
  this._scopeCache = new Map();
10242
10200
  this._resolverCache = new Map();
10243
10201
  }
10244
- _createClass$1(Config, [{
10202
+ return _createClass$1(Config, [{
10245
10203
  key: "platform",
10246
10204
  get: function get() {
10247
10205
  return this._config.platform;
@@ -10419,7 +10377,6 @@
10419
10377
  return isObject(context) ? _attachContext(resolver, context, undefined, descriptorDefaults) : resolver;
10420
10378
  }
10421
10379
  }]);
10422
- return Config;
10423
10380
  }();
10424
10381
  function getResolver(resolverCache, scopes, prefixes) {
10425
10382
  var cache = resolverCache.get(scopes);
@@ -10469,7 +10426,7 @@
10469
10426
  }
10470
10427
  return false;
10471
10428
  }
10472
- var version = "4.4.2";
10429
+ var version = "4.4.3";
10473
10430
  var KNOWN_POSITIONS = ['top', 'bottom', 'left', 'right', 'chartArea'];
10474
10431
  function positionIsHorizontal(position, axis) {
10475
10432
  return position === 'top' || position === 'bottom' || KNOWN_POSITIONS.indexOf(position) === -1 && axis === 'x';
@@ -10605,7 +10562,7 @@
10605
10562
  this.update();
10606
10563
  }
10607
10564
  }
10608
- _createClass$1(Chart, [{
10565
+ return _createClass$1(Chart, [{
10609
10566
  key: "aspectRatio",
10610
10567
  get: function get() {
10611
10568
  var _this$options12 = this.options,
@@ -11554,7 +11511,6 @@
11554
11511
  invalidatePlugins();
11555
11512
  }
11556
11513
  }]);
11557
- return Chart;
11558
11514
  }();
11559
11515
  _defineProperty$1(Chart, "defaults", defaults);
11560
11516
  _defineProperty$1(Chart, "instances", instances);
@@ -11781,20 +11737,18 @@
11781
11737
  ctx.stroke();
11782
11738
  }
11783
11739
  }
11784
- var ArcElement = /*#__PURE__*/function (_Element2) {
11785
- _inherits$1(ArcElement, _Element2);
11786
- var _super12 = _createSuper$1(ArcElement);
11740
+ var ArcElement = /*#__PURE__*/function (_Element3) {
11787
11741
  function ArcElement(cfg) {
11788
11742
  var _this23;
11789
11743
  _classCallCheck$1(this, ArcElement);
11790
- _this23 = _super12.call(this);
11791
- _defineProperty$1(_assertThisInitialized$1(_this23), "circumference", void 0);
11792
- _defineProperty$1(_assertThisInitialized$1(_this23), "endAngle", void 0);
11793
- _defineProperty$1(_assertThisInitialized$1(_this23), "fullCircles", void 0);
11794
- _defineProperty$1(_assertThisInitialized$1(_this23), "innerRadius", void 0);
11795
- _defineProperty$1(_assertThisInitialized$1(_this23), "outerRadius", void 0);
11796
- _defineProperty$1(_assertThisInitialized$1(_this23), "pixelMargin", void 0);
11797
- _defineProperty$1(_assertThisInitialized$1(_this23), "startAngle", void 0);
11744
+ _this23 = _callSuper(this, ArcElement);
11745
+ _defineProperty$1(_this23, "circumference", void 0);
11746
+ _defineProperty$1(_this23, "endAngle", void 0);
11747
+ _defineProperty$1(_this23, "fullCircles", void 0);
11748
+ _defineProperty$1(_this23, "innerRadius", void 0);
11749
+ _defineProperty$1(_this23, "outerRadius", void 0);
11750
+ _defineProperty$1(_this23, "pixelMargin", void 0);
11751
+ _defineProperty$1(_this23, "startAngle", void 0);
11798
11752
  _this23.options = undefined;
11799
11753
  _this23.circumference = undefined;
11800
11754
  _this23.startAngle = undefined;
@@ -11804,11 +11758,12 @@
11804
11758
  _this23.pixelMargin = 0;
11805
11759
  _this23.fullCircles = 0;
11806
11760
  if (cfg) {
11807
- Object.assign(_assertThisInitialized$1(_this23), cfg);
11761
+ Object.assign(_this23, cfg);
11808
11762
  }
11809
11763
  return _this23;
11810
11764
  }
11811
- _createClass$1(ArcElement, [{
11765
+ _inherits$1(ArcElement, _Element3);
11766
+ return _createClass$1(ArcElement, [{
11812
11767
  key: "inRange",
11813
11768
  value: function inRange(chartX, chartY, useFinalPosition) {
11814
11769
  var point = this.getProps(['x', 'y'], useFinalPosition);
@@ -11880,7 +11835,6 @@
11880
11835
  ctx.restore();
11881
11836
  }
11882
11837
  }]);
11883
- return ArcElement;
11884
11838
  }(Element);
11885
11839
  _defineProperty$1(ArcElement, "id", 'arc');
11886
11840
  _defineProperty$1(ArcElement, "defaults", {
@@ -12089,13 +12043,11 @@
12089
12043
  strokePathDirect(ctx, line, start, count);
12090
12044
  }
12091
12045
  }
12092
- var LineElement = /*#__PURE__*/function (_Element3) {
12093
- _inherits$1(LineElement, _Element3);
12094
- var _super13 = _createSuper$1(LineElement);
12046
+ var LineElement = /*#__PURE__*/function (_Element4) {
12095
12047
  function LineElement(cfg) {
12096
12048
  var _this24;
12097
12049
  _classCallCheck$1(this, LineElement);
12098
- _this24 = _super13.call(this);
12050
+ _this24 = _callSuper(this, LineElement);
12099
12051
  _this24.animated = true;
12100
12052
  _this24.options = undefined;
12101
12053
  _this24._chart = undefined;
@@ -12108,11 +12060,12 @@
12108
12060
  _this24._pointsUpdated = false;
12109
12061
  _this24._datasetIndex = undefined;
12110
12062
  if (cfg) {
12111
- Object.assign(_assertThisInitialized$1(_this24), cfg);
12063
+ Object.assign(_this24, cfg);
12112
12064
  }
12113
12065
  return _this24;
12114
12066
  }
12115
- _createClass$1(LineElement, [{
12067
+ _inherits$1(LineElement, _Element4);
12068
+ return _createClass$1(LineElement, [{
12116
12069
  key: "updateControlPoints",
12117
12070
  value: function updateControlPoints(chartArea, indexAxis) {
12118
12071
  var options = this.options;
@@ -12234,7 +12187,6 @@
12234
12187
  }
12235
12188
  }
12236
12189
  }]);
12237
- return LineElement;
12238
12190
  }(Element);
12239
12191
  _defineProperty$1(LineElement, "id", 'line');
12240
12192
  _defineProperty$1(LineElement, "defaults", {
@@ -12266,26 +12218,25 @@
12266
12218
  value = _el$getProps[axis];
12267
12219
  return Math.abs(pos - value) < options.radius + options.hitRadius;
12268
12220
  }
12269
- var PointElement = /*#__PURE__*/function (_Element4) {
12270
- _inherits$1(PointElement, _Element4);
12271
- var _super14 = _createSuper$1(PointElement);
12221
+ var PointElement = /*#__PURE__*/function (_Element5) {
12272
12222
  function PointElement(cfg) {
12273
12223
  var _this25;
12274
12224
  _classCallCheck$1(this, PointElement);
12275
- _this25 = _super14.call(this);
12276
- _defineProperty$1(_assertThisInitialized$1(_this25), "parsed", void 0);
12277
- _defineProperty$1(_assertThisInitialized$1(_this25), "skip", void 0);
12278
- _defineProperty$1(_assertThisInitialized$1(_this25), "stop", void 0);
12225
+ _this25 = _callSuper(this, PointElement);
12226
+ _defineProperty$1(_this25, "parsed", void 0);
12227
+ _defineProperty$1(_this25, "skip", void 0);
12228
+ _defineProperty$1(_this25, "stop", void 0);
12279
12229
  _this25.options = undefined;
12280
12230
  _this25.parsed = undefined;
12281
12231
  _this25.skip = undefined;
12282
12232
  _this25.stop = undefined;
12283
12233
  if (cfg) {
12284
- Object.assign(_assertThisInitialized$1(_this25), cfg);
12234
+ Object.assign(_this25, cfg);
12285
12235
  }
12286
12236
  return _this25;
12287
12237
  }
12288
- _createClass$1(PointElement, [{
12238
+ _inherits$1(PointElement, _Element5);
12239
+ return _createClass$1(PointElement, [{
12289
12240
  key: "inRange",
12290
12241
  value: function inRange(mouseX, mouseY, useFinalPosition) {
12291
12242
  var options = this.options;
@@ -12344,7 +12295,6 @@
12344
12295
  return options.radius + options.hitRadius;
12345
12296
  }
12346
12297
  }]);
12347
- return PointElement;
12348
12298
  }(Element);
12349
12299
  _defineProperty$1(PointElement, "id", 'point');
12350
12300
  /**
@@ -12478,13 +12428,11 @@
12478
12428
  radius: rect.radius
12479
12429
  };
12480
12430
  }
12481
- var BarElement = /*#__PURE__*/function (_Element5) {
12482
- _inherits$1(BarElement, _Element5);
12483
- var _super15 = _createSuper$1(BarElement);
12431
+ var BarElement = /*#__PURE__*/function (_Element6) {
12484
12432
  function BarElement(cfg) {
12485
12433
  var _this26;
12486
12434
  _classCallCheck$1(this, BarElement);
12487
- _this26 = _super15.call(this);
12435
+ _this26 = _callSuper(this, BarElement);
12488
12436
  _this26.options = undefined;
12489
12437
  _this26.horizontal = undefined;
12490
12438
  _this26.base = undefined;
@@ -12492,11 +12440,12 @@
12492
12440
  _this26.height = undefined;
12493
12441
  _this26.inflateAmount = undefined;
12494
12442
  if (cfg) {
12495
- Object.assign(_assertThisInitialized$1(_this26), cfg);
12443
+ Object.assign(_this26, cfg);
12496
12444
  }
12497
12445
  return _this26;
12498
12446
  }
12499
- _createClass$1(BarElement, [{
12447
+ _inherits$1(BarElement, _Element6);
12448
+ return _createClass$1(BarElement, [{
12500
12449
  key: "draw",
12501
12450
  value: function draw(ctx) {
12502
12451
  var inflateAmount = this.inflateAmount,
@@ -12556,7 +12505,6 @@
12556
12505
  return axis === 'x' ? this.width / 2 : this.height / 2;
12557
12506
  }
12558
12507
  }]);
12559
- return BarElement;
12560
12508
  }(Element);
12561
12509
  _defineProperty$1(BarElement, "id", 'bar');
12562
12510
  _defineProperty$1(BarElement, "defaults", {
@@ -13186,7 +13134,7 @@
13186
13134
  this.y = opts.y;
13187
13135
  this.radius = opts.radius;
13188
13136
  }
13189
- _createClass$1(simpleArc, [{
13137
+ return _createClass$1(simpleArc, [{
13190
13138
  key: "pathSegment",
13191
13139
  value: function pathSegment(ctx, bounds, opts) {
13192
13140
  var x = this.x,
@@ -13213,7 +13161,6 @@
13213
13161
  };
13214
13162
  }
13215
13163
  }]);
13216
- return simpleArc;
13217
13164
  }();
13218
13165
  function _getTarget(source) {
13219
13166
  var chart = source.chart,
@@ -13540,13 +13487,11 @@
13540
13487
  var itemsEqual = function itemsEqual(a, b) {
13541
13488
  return a !== null && b !== null && a.datasetIndex === b.datasetIndex && a.index === b.index;
13542
13489
  };
13543
- var Legend = /*#__PURE__*/function (_Element6) {
13544
- _inherits$1(Legend, _Element6);
13545
- var _super16 = _createSuper$1(Legend);
13490
+ var Legend = /*#__PURE__*/function (_Element7) {
13546
13491
  function Legend(config) {
13547
13492
  var _this27;
13548
13493
  _classCallCheck$1(this, Legend);
13549
- _this27 = _super16.call(this);
13494
+ _this27 = _callSuper(this, Legend);
13550
13495
  _this27._added = false;
13551
13496
  _this27.legendHitBoxes = [];
13552
13497
  _this27._hoveredItem = null;
@@ -13571,7 +13516,8 @@
13571
13516
  _this27.fullSize = undefined;
13572
13517
  return _this27;
13573
13518
  }
13574
- _createClass$1(Legend, [{
13519
+ _inherits$1(Legend, _Element7);
13520
+ return _createClass$1(Legend, [{
13575
13521
  key: "update",
13576
13522
  value: function update(maxWidth, maxHeight, margins) {
13577
13523
  this.maxWidth = maxWidth;
@@ -14008,7 +13954,6 @@
14008
13954
  }
14009
13955
  }
14010
13956
  }]);
14011
- return Legend;
14012
13957
  }(Element);
14013
13958
  function calculateItemSize(boxWidth, labelFont, ctx, legendItem, _itemHeight) {
14014
13959
  var itemWidth = calculateItemWidth(legendItem, boxWidth, labelFont, ctx);
@@ -14156,13 +14101,11 @@
14156
14101
  }
14157
14102
  }
14158
14103
  };
14159
- var Title = /*#__PURE__*/function (_Element7) {
14160
- _inherits$1(Title, _Element7);
14161
- var _super17 = _createSuper$1(Title);
14104
+ var Title = /*#__PURE__*/function (_Element8) {
14162
14105
  function Title(config) {
14163
14106
  var _this30;
14164
14107
  _classCallCheck$1(this, Title);
14165
- _this30 = _super17.call(this);
14108
+ _this30 = _callSuper(this, Title);
14166
14109
  _this30.chart = config.chart;
14167
14110
  _this30.options = config.options;
14168
14111
  _this30.ctx = config.ctx;
@@ -14178,7 +14121,8 @@
14178
14121
  _this30.fullSize = undefined;
14179
14122
  return _this30;
14180
14123
  }
14181
- _createClass$1(Title, [{
14124
+ _inherits$1(Title, _Element8);
14125
+ return _createClass$1(Title, [{
14182
14126
  key: "update",
14183
14127
  value: function update(maxWidth, maxHeight) {
14184
14128
  var opts = this.options;
@@ -14265,7 +14209,6 @@
14265
14209
  });
14266
14210
  }
14267
14211
  }]);
14268
- return Title;
14269
14212
  }(Element);
14270
14213
  function createTitle(chart, titleOpts) {
14271
14214
  var title = new Title({
@@ -14690,13 +14633,11 @@
14690
14633
  }
14691
14634
  return result;
14692
14635
  }
14693
- var Tooltip = /*#__PURE__*/function (_Element8) {
14694
- _inherits$1(Tooltip, _Element8);
14695
- var _super18 = _createSuper$1(Tooltip);
14636
+ var Tooltip = /*#__PURE__*/function (_Element9) {
14696
14637
  function Tooltip(config) {
14697
14638
  var _this31;
14698
14639
  _classCallCheck$1(this, Tooltip);
14699
- _this31 = _super18.call(this);
14640
+ _this31 = _callSuper(this, Tooltip);
14700
14641
  _this31.opacity = 0;
14701
14642
  _this31._active = [];
14702
14643
  _this31._eventPosition = undefined;
@@ -14726,7 +14667,8 @@
14726
14667
  _this31.labelTextColors = undefined;
14727
14668
  return _this31;
14728
14669
  }
14729
- _createClass$1(Tooltip, [{
14670
+ _inherits$1(Tooltip, _Element9);
14671
+ return _createClass$1(Tooltip, [{
14730
14672
  key: "initialize",
14731
14673
  value: function initialize(options) {
14732
14674
  this.options = options;
@@ -15323,7 +15265,6 @@
15323
15265
  return position !== false && (caretX !== position.x || caretY !== position.y);
15324
15266
  }
15325
15267
  }]);
15326
- return Tooltip;
15327
15268
  }(Element);
15328
15269
  _defineProperty$1(Tooltip, "positioners", positioners);
15329
15270
  var plugin_tooltip = {
@@ -15489,18 +15430,17 @@
15489
15430
  return value;
15490
15431
  }
15491
15432
  var CategoryScale = /*#__PURE__*/function (_Scale) {
15492
- _inherits$1(CategoryScale, _Scale);
15493
- var _super19 = _createSuper$1(CategoryScale);
15494
15433
  function CategoryScale(cfg) {
15495
15434
  var _this36;
15496
15435
  _classCallCheck$1(this, CategoryScale);
15497
- _this36 = _super19.call(this, cfg);
15436
+ _this36 = _callSuper(this, CategoryScale, [cfg]);
15498
15437
  _this36._startValue = undefined;
15499
15438
  _this36._valueRange = 0;
15500
15439
  _this36._addedLabels = [];
15501
15440
  return _this36;
15502
15441
  }
15503
- _createClass$1(CategoryScale, [{
15442
+ _inherits$1(CategoryScale, _Scale);
15443
+ return _createClass$1(CategoryScale, [{
15504
15444
  key: "init",
15505
15445
  value: function init(scaleOptions) {
15506
15446
  var added = this._addedLabels;
@@ -15615,7 +15555,6 @@
15615
15555
  return this.bottom;
15616
15556
  }
15617
15557
  }]);
15618
- return CategoryScale;
15619
15558
  }(Scale);
15620
15559
  _defineProperty$1(CategoryScale, "id", 'category');
15621
15560
  _defineProperty$1(CategoryScale, "defaults", {
@@ -15738,12 +15677,10 @@
15738
15677
  return Math.min(minSpacing / ratio, length);
15739
15678
  }
15740
15679
  var LinearScaleBase = /*#__PURE__*/function (_Scale2) {
15741
- _inherits$1(LinearScaleBase, _Scale2);
15742
- var _super20 = _createSuper$1(LinearScaleBase);
15743
15680
  function LinearScaleBase(cfg) {
15744
15681
  var _this37;
15745
15682
  _classCallCheck$1(this, LinearScaleBase);
15746
- _this37 = _super20.call(this, cfg);
15683
+ _this37 = _callSuper(this, LinearScaleBase, [cfg]);
15747
15684
  _this37.start = undefined;
15748
15685
  _this37.end = undefined;
15749
15686
  _this37._startValue = undefined;
@@ -15751,7 +15688,8 @@
15751
15688
  _this37._valueRange = 0;
15752
15689
  return _this37;
15753
15690
  }
15754
- _createClass$1(LinearScaleBase, [{
15691
+ _inherits$1(LinearScaleBase, _Scale2);
15692
+ return _createClass$1(LinearScaleBase, [{
15755
15693
  key: "parse",
15756
15694
  value: function parse(raw, index) {
15757
15695
  if (isNullOrUndef(raw)) {
@@ -15880,16 +15818,14 @@
15880
15818
  return formatNumber(value, this.chart.options.locale, this.options.ticks.format);
15881
15819
  }
15882
15820
  }]);
15883
- return LinearScaleBase;
15884
15821
  }(Scale);
15885
15822
  var LinearScale = /*#__PURE__*/function (_LinearScaleBase) {
15886
- _inherits$1(LinearScale, _LinearScaleBase);
15887
- var _super21 = _createSuper$1(LinearScale);
15888
15823
  function LinearScale() {
15889
15824
  _classCallCheck$1(this, LinearScale);
15890
- return _super21.apply(this, arguments);
15825
+ return _callSuper(this, LinearScale, arguments);
15891
15826
  }
15892
- _createClass$1(LinearScale, [{
15827
+ _inherits$1(LinearScale, _LinearScaleBase);
15828
+ return _createClass$1(LinearScale, [{
15893
15829
  key: "determineDataLimits",
15894
15830
  value: function determineDataLimits() {
15895
15831
  var _this$getMinMax2 = this.getMinMax(true),
@@ -15920,7 +15856,6 @@
15920
15856
  return this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;
15921
15857
  }
15922
15858
  }]);
15923
- return LinearScale;
15924
15859
  }(LinearScaleBase);
15925
15860
  _defineProperty$1(LinearScale, "id", 'linear');
15926
15861
  _defineProperty$1(LinearScale, "defaults", {
@@ -15996,19 +15931,18 @@
15996
15931
  return ticks;
15997
15932
  }
15998
15933
  var LogarithmicScale = /*#__PURE__*/function (_Scale3) {
15999
- _inherits$1(LogarithmicScale, _Scale3);
16000
- var _super22 = _createSuper$1(LogarithmicScale);
16001
15934
  function LogarithmicScale(cfg) {
16002
15935
  var _this38;
16003
15936
  _classCallCheck$1(this, LogarithmicScale);
16004
- _this38 = _super22.call(this, cfg);
15937
+ _this38 = _callSuper(this, LogarithmicScale, [cfg]);
16005
15938
  _this38.start = undefined;
16006
15939
  _this38.end = undefined;
16007
15940
  _this38._startValue = undefined;
16008
15941
  _this38._valueRange = 0;
16009
15942
  return _this38;
16010
15943
  }
16011
- _createClass$1(LogarithmicScale, [{
15944
+ _inherits$1(LogarithmicScale, _Scale3);
15945
+ return _createClass$1(LogarithmicScale, [{
16012
15946
  key: "parse",
16013
15947
  value: function parse(raw, index) {
16014
15948
  var value = LinearScaleBase.prototype.parse.apply(this, [raw, index]);
@@ -16119,7 +16053,6 @@
16119
16053
  return Math.pow(10, this._startValue + decimal * this._valueRange);
16120
16054
  }
16121
16055
  }]);
16122
- return LogarithmicScale;
16123
16056
  }(Scale);
16124
16057
  _defineProperty$1(LogarithmicScale, "id", 'logarithmic');
16125
16058
  _defineProperty$1(LogarithmicScale, "defaults", {
@@ -16398,12 +16331,10 @@
16398
16331
  });
16399
16332
  }
16400
16333
  var RadialLinearScale = /*#__PURE__*/function (_LinearScaleBase2) {
16401
- _inherits$1(RadialLinearScale, _LinearScaleBase2);
16402
- var _super23 = _createSuper$1(RadialLinearScale);
16403
16334
  function RadialLinearScale(cfg) {
16404
16335
  var _this39;
16405
16336
  _classCallCheck$1(this, RadialLinearScale);
16406
- _this39 = _super23.call(this, cfg);
16337
+ _this39 = _callSuper(this, RadialLinearScale, [cfg]);
16407
16338
  _this39.xCenter = undefined;
16408
16339
  _this39.yCenter = undefined;
16409
16340
  _this39.drawingArea = undefined;
@@ -16411,7 +16342,8 @@
16411
16342
  _this39._pointLabelItems = [];
16412
16343
  return _this39;
16413
16344
  }
16414
- _createClass$1(RadialLinearScale, [{
16345
+ _inherits$1(RadialLinearScale, _LinearScaleBase2);
16346
+ return _createClass$1(RadialLinearScale, [{
16415
16347
  key: "setDimensions",
16416
16348
  value: function setDimensions() {
16417
16349
  var padding = this._padding = toPadding(getTickBackdropHeight(this.options) / 2);
@@ -16649,7 +16581,6 @@
16649
16581
  key: "drawTitle",
16650
16582
  value: function drawTitle() {}
16651
16583
  }]);
16652
- return RadialLinearScale;
16653
16584
  }(LinearScaleBase);
16654
16585
  _defineProperty$1(RadialLinearScale, "id", 'radialLinear');
16655
16586
  _defineProperty$1(RadialLinearScale, "defaults", {
@@ -16835,12 +16766,10 @@
16835
16766
  return ilen === 0 || !majorUnit ? ticks : setMajorTicks(scale, ticks, map, majorUnit);
16836
16767
  }
16837
16768
  var TimeScale = /*#__PURE__*/function (_Scale4) {
16838
- _inherits$1(TimeScale, _Scale4);
16839
- var _super24 = _createSuper$1(TimeScale);
16840
16769
  function TimeScale(props) {
16841
16770
  var _this43;
16842
16771
  _classCallCheck$1(this, TimeScale);
16843
- _this43 = _super24.call(this, props);
16772
+ _this43 = _callSuper(this, TimeScale, [props]);
16844
16773
  _this43._cache = {
16845
16774
  data: [],
16846
16775
  labels: [],
@@ -16853,7 +16782,8 @@
16853
16782
  _this43._parseOpts = undefined;
16854
16783
  return _this43;
16855
16784
  }
16856
- _createClass$1(TimeScale, [{
16785
+ _inherits$1(TimeScale, _Scale4);
16786
+ return _createClass$1(TimeScale, [{
16857
16787
  key: "init",
16858
16788
  value: function init(scaleOpts) {
16859
16789
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -17152,7 +17082,6 @@
17152
17082
  return _arrayUnique(values.sort(sorter));
17153
17083
  }
17154
17084
  }]);
17155
- return TimeScale;
17156
17085
  }(Scale);
17157
17086
  _defineProperty$1(TimeScale, "id", 'time');
17158
17087
  _defineProperty$1(TimeScale, "defaults", {
@@ -17206,19 +17135,18 @@
17206
17135
  var span = nextSource - prevSource;
17207
17136
  return span ? prevTarget + (nextTarget - prevTarget) * (val - prevSource) / span : prevTarget;
17208
17137
  }
17209
- var TimeSeriesScale = /*#__PURE__*/function (_TimeScale) {
17210
- _inherits$1(TimeSeriesScale, _TimeScale);
17211
- var _super25 = _createSuper$1(TimeSeriesScale);
17138
+ var TimeSeriesScale = /*#__PURE__*/function (_TimeScale2) {
17212
17139
  function TimeSeriesScale(props) {
17213
17140
  var _this44;
17214
17141
  _classCallCheck$1(this, TimeSeriesScale);
17215
- _this44 = _super25.call(this, props);
17142
+ _this44 = _callSuper(this, TimeSeriesScale, [props]);
17216
17143
  _this44._table = [];
17217
17144
  _this44._minPos = undefined;
17218
17145
  _this44._tableRange = undefined;
17219
17146
  return _this44;
17220
17147
  }
17221
- _createClass$1(TimeSeriesScale, [{
17148
+ _inherits$1(TimeSeriesScale, _TimeScale2);
17149
+ return _createClass$1(TimeSeriesScale, [{
17222
17150
  key: "initOffsets",
17223
17151
  value: function initOffsets() {
17224
17152
  var timestamps = this._getTimestampsForTable();
@@ -17309,7 +17237,6 @@
17309
17237
  return interpolate(this._table, decimal * this._tableRange + this._minPos, true);
17310
17238
  }
17311
17239
  }]);
17312
- return TimeSeriesScale;
17313
17240
  }(TimeScale);
17314
17241
  _defineProperty$1(TimeSeriesScale, "id", 'timeseries');
17315
17242
  _defineProperty$1(TimeSeriesScale, "defaults", TimeScale.defaults);
@@ -21002,15 +20929,12 @@
21002
20929
  }
21003
20930
 
21004
20931
  function _isNativeReflectConstruct() {
21005
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
21006
- if (Reflect.construct.sham) return false;
21007
- if (typeof Proxy === "function") return true;
21008
20932
  try {
21009
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
21010
- return true;
21011
- } catch (e) {
21012
- return false;
21013
- }
20933
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
20934
+ } catch (t) {}
20935
+ return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
20936
+ return !!t;
20937
+ })();
21014
20938
  }
21015
20939
 
21016
20940
  function _possibleConstructorReturn(self, call) {
@@ -21043,20 +20967,20 @@
21043
20967
  }
21044
20968
  }
21045
20969
 
21046
- function _toPrimitive(input, hint) {
21047
- if (_typeof(input) !== "object" || input === null) return input;
21048
- var prim = input[Symbol.toPrimitive];
21049
- if (prim !== undefined) {
21050
- var res = prim.call(input, hint || "default");
21051
- if (_typeof(res) !== "object") return res;
20970
+ function toPrimitive(t, r) {
20971
+ if ("object" != _typeof(t) || !t) return t;
20972
+ var e = t[Symbol.toPrimitive];
20973
+ if (void 0 !== e) {
20974
+ var i = e.call(t, r || "default");
20975
+ if ("object" != _typeof(i)) return i;
21052
20976
  throw new TypeError("@@toPrimitive must return a primitive value.");
21053
20977
  }
21054
- return (hint === "string" ? String : Number)(input);
20978
+ return ("string" === r ? String : Number)(t);
21055
20979
  }
21056
20980
 
21057
- function _toPropertyKey(arg) {
21058
- var key = _toPrimitive(arg, "string");
21059
- return _typeof(key) === "symbol" ? key : String(key);
20981
+ function toPropertyKey(t) {
20982
+ var i = toPrimitive(t, "string");
20983
+ return "symbol" == _typeof(i) ? i : i + "";
21060
20984
  }
21061
20985
 
21062
20986
  function _defineProperties(target, props) {
@@ -21065,7 +20989,7 @@
21065
20989
  descriptor.enumerable = descriptor.enumerable || false;
21066
20990
  descriptor.configurable = true;
21067
20991
  if ("value" in descriptor) descriptor.writable = true;
21068
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
20992
+ Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
21069
20993
  }
21070
20994
  }
21071
20995
  function _createClass(Constructor, protoProps, staticProps) {
@@ -21078,7 +21002,7 @@
21078
21002
  }
21079
21003
 
21080
21004
  function _defineProperty(obj, key, value) {
21081
- key = _toPropertyKey(key);
21005
+ key = toPropertyKey(key);
21082
21006
  if (key in obj) {
21083
21007
  Object.defineProperty(obj, key, {
21084
21008
  value: value,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chartkick
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.6
4
+ version: 5.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-29 00:00:00.000000000 Z
11
+ date: 2024-05-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: andrew@ankane.org
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0'
54
54
  requirements: []
55
- rubygems_version: 3.5.3
55
+ rubygems_version: 3.5.9
56
56
  signing_key:
57
57
  specification_version: 4
58
58
  summary: Create beautiful JavaScript charts with one line of Ruby