chartkick 5.0.5 → 5.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/chartkick/version.rb +1 -1
- data/vendor/assets/javascripts/Chart.bundle.js +199 -268
- metadata +3 -3
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* Chart.js v4.4.
|
2
|
+
* Chart.js v4.4.3
|
3
3
|
* https://www.chartjs.org
|
4
|
-
* (c)
|
4
|
+
* (c) 2024 Chart.js Contributors
|
5
5
|
* Released under the MIT License
|
6
6
|
*
|
7
7
|
* @kurkle/color v0.3.2
|
@@ -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
|
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
|
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
|
-
|
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
|
4823
|
-
clearStacks(
|
4824
|
-
|
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 (
|
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
|
5606
|
+
return _callSuper(this, BarController, arguments);
|
5624
5607
|
}
|
5625
|
-
|
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 (
|
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
|
5937
|
+
return _callSuper(this, BubbleController, arguments);
|
5957
5938
|
}
|
5958
|
-
|
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 (
|
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 =
|
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
|
-
|
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 (
|
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
|
6425
|
+
return _callSuper(this, LineController, arguments);
|
6449
6426
|
}
|
6450
|
-
|
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 (
|
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 =
|
6560
|
+
_this5 = _callSuper(this, PolarAreaController, [chart, datasetIndex]);
|
6586
6561
|
_this5.innerRadius = undefined;
|
6587
6562
|
_this5.outerRadius = undefined;
|
6588
6563
|
return _this5;
|
6589
6564
|
}
|
6590
|
-
|
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 (
|
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
|
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 (
|
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
|
6774
|
+
return _callSuper(this, RadarController, arguments);
|
6803
6775
|
}
|
6804
|
-
|
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 (
|
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
|
6860
|
+
return _callSuper(this, ScatterController, arguments);
|
6891
6861
|
}
|
6892
|
-
|
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
|
7725
|
+
return _callSuper(this, BasicPlatform, arguments);
|
7760
7726
|
}
|
7761
|
-
|
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 = {
|
@@ -7825,10 +7791,14 @@
|
|
7825
7791
|
passive: true
|
7826
7792
|
} : false;
|
7827
7793
|
function addListener(node, type, listener) {
|
7828
|
-
node
|
7794
|
+
if (node) {
|
7795
|
+
node.addEventListener(type, listener, eventListenerOptions);
|
7796
|
+
}
|
7829
7797
|
}
|
7830
7798
|
function removeListener(chart, type, listener) {
|
7831
|
-
chart.canvas
|
7799
|
+
if (chart && chart.canvas) {
|
7800
|
+
chart.canvas.removeEventListener(type, listener, eventListenerOptions);
|
7801
|
+
}
|
7832
7802
|
}
|
7833
7803
|
function fromNativeEvent(event, chart) {
|
7834
7804
|
var type = EVENT_TYPES[event.type] || event.type;
|
@@ -7984,13 +7954,12 @@
|
|
7984
7954
|
return proxy;
|
7985
7955
|
}
|
7986
7956
|
var DomPlatform = /*#__PURE__*/function (_BasePlatform2) {
|
7987
|
-
_inherits$1(DomPlatform, _BasePlatform2);
|
7988
|
-
var _super10 = _createSuper$1(DomPlatform);
|
7989
7957
|
function DomPlatform() {
|
7990
7958
|
_classCallCheck$1(this, DomPlatform);
|
7991
|
-
return
|
7959
|
+
return _callSuper(this, DomPlatform, arguments);
|
7992
7960
|
}
|
7993
|
-
|
7961
|
+
_inherits$1(DomPlatform, _BasePlatform2);
|
7962
|
+
return _createClass$1(DomPlatform, [{
|
7994
7963
|
key: "acquireContext",
|
7995
7964
|
value: function acquireContext(canvas, aspectRatio) {
|
7996
7965
|
var context = canvas && canvas.getContext && canvas.getContext('2d');
|
@@ -8067,11 +8036,10 @@
|
|
8067
8036
|
}, {
|
8068
8037
|
key: "isAttached",
|
8069
8038
|
value: function isAttached(canvas) {
|
8070
|
-
var container = _getParentNode(canvas);
|
8039
|
+
var container = canvas && _getParentNode(canvas);
|
8071
8040
|
return !!(container && container.isConnected);
|
8072
8041
|
}
|
8073
8042
|
}]);
|
8074
|
-
return DomPlatform;
|
8075
8043
|
}(BasePlatform);
|
8076
8044
|
function _detectPlatform(canvas) {
|
8077
8045
|
if (!_isDomSupported() || typeof OffscreenCanvas !== 'undefined' && canvas instanceof OffscreenCanvas) {
|
@@ -8088,7 +8056,7 @@
|
|
8088
8056
|
_defineProperty$1(this, "options", void 0);
|
8089
8057
|
_defineProperty$1(this, "$animations", void 0);
|
8090
8058
|
}
|
8091
|
-
_createClass$1(Element, [{
|
8059
|
+
return _createClass$1(Element, [{
|
8092
8060
|
key: "tooltipPosition",
|
8093
8061
|
value: function tooltipPosition(useFinalPosition) {
|
8094
8062
|
var _this$getProps = this.getProps(['x', 'y'], useFinalPosition),
|
@@ -8120,7 +8088,6 @@
|
|
8120
8088
|
return ret;
|
8121
8089
|
}
|
8122
8090
|
}]);
|
8123
|
-
return Element;
|
8124
8091
|
}();
|
8125
8092
|
_defineProperty$1(Element, "defaults", {});
|
8126
8093
|
_defineProperty$1(Element, "defaultRoutes", undefined);
|
@@ -8363,13 +8330,11 @@
|
|
8363
8330
|
rotation: rotation
|
8364
8331
|
};
|
8365
8332
|
}
|
8366
|
-
var Scale = /*#__PURE__*/function (
|
8367
|
-
_inherits$1(Scale, _Element);
|
8368
|
-
var _super11 = _createSuper$1(Scale);
|
8333
|
+
var Scale = /*#__PURE__*/function (_Element2) {
|
8369
8334
|
function Scale(cfg) {
|
8370
8335
|
var _this9;
|
8371
8336
|
_classCallCheck$1(this, Scale);
|
8372
|
-
_this9 =
|
8337
|
+
_this9 = _callSuper(this, Scale);
|
8373
8338
|
_this9.id = cfg.id;
|
8374
8339
|
_this9.type = cfg.type;
|
8375
8340
|
_this9.options = undefined;
|
@@ -8419,7 +8384,8 @@
|
|
8419
8384
|
_this9.$context = undefined;
|
8420
8385
|
return _this9;
|
8421
8386
|
}
|
8422
|
-
|
8387
|
+
_inherits$1(Scale, _Element2);
|
8388
|
+
return _createClass$1(Scale, [{
|
8423
8389
|
key: "init",
|
8424
8390
|
value: function init(options) {
|
8425
8391
|
this.options = options.setContext(this.getContext());
|
@@ -9686,7 +9652,6 @@
|
|
9686
9652
|
return (this.isHorizontal() ? this.width : this.height) / fontSize;
|
9687
9653
|
}
|
9688
9654
|
}]);
|
9689
|
-
return Scale;
|
9690
9655
|
}(Element);
|
9691
9656
|
var TypedRegistry = /*#__PURE__*/function () {
|
9692
9657
|
function TypedRegistry(type, scope, override) {
|
@@ -9696,7 +9661,7 @@
|
|
9696
9661
|
this.override = override;
|
9697
9662
|
this.items = Object.create(null);
|
9698
9663
|
}
|
9699
|
-
_createClass$1(TypedRegistry, [{
|
9664
|
+
return _createClass$1(TypedRegistry, [{
|
9700
9665
|
key: "isForType",
|
9701
9666
|
value: function isForType(type) {
|
9702
9667
|
return Object.prototype.isPrototypeOf.call(this.type.prototype, type.prototype);
|
@@ -9747,7 +9712,6 @@
|
|
9747
9712
|
}
|
9748
9713
|
}
|
9749
9714
|
}]);
|
9750
|
-
return TypedRegistry;
|
9751
9715
|
}();
|
9752
9716
|
function registerDefaults(item, scope, parentScope) {
|
9753
9717
|
var itemDefaults = merge(Object.create(null), [parentScope ? defaults.get(parentScope) : {}, defaults.get(scope), item.defaults]);
|
@@ -9782,7 +9746,7 @@
|
|
9782
9746
|
this.scales = new TypedRegistry(Scale, 'scales');
|
9783
9747
|
this._typedRegistries = [this.controllers, this.scales, this.elements];
|
9784
9748
|
}
|
9785
|
-
_createClass$1(Registry, [{
|
9749
|
+
return _createClass$1(Registry, [{
|
9786
9750
|
key: "add",
|
9787
9751
|
value: function add() {
|
9788
9752
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
@@ -9927,7 +9891,6 @@
|
|
9927
9891
|
return item;
|
9928
9892
|
}
|
9929
9893
|
}]);
|
9930
|
-
return Registry;
|
9931
9894
|
}();
|
9932
9895
|
var registry = /* #__PURE__ */new Registry();
|
9933
9896
|
var PluginService = /*#__PURE__*/function () {
|
@@ -9935,7 +9898,7 @@
|
|
9935
9898
|
_classCallCheck$1(this, PluginService);
|
9936
9899
|
this._init = [];
|
9937
9900
|
}
|
9938
|
-
_createClass$1(PluginService, [{
|
9901
|
+
return _createClass$1(PluginService, [{
|
9939
9902
|
key: "notify",
|
9940
9903
|
value: function notify(chart, hook, args, filter) {
|
9941
9904
|
if (hook === 'beforeInit') {
|
@@ -10015,7 +9978,6 @@
|
|
10015
9978
|
this._notify(diff(descriptors, previousDescriptors), chart, 'start');
|
10016
9979
|
}
|
10017
9980
|
}]);
|
10018
|
-
return PluginService;
|
10019
9981
|
}();
|
10020
9982
|
function allPlugins(config) {
|
10021
9983
|
var localIds = {};
|
@@ -10237,7 +10199,7 @@
|
|
10237
10199
|
this._scopeCache = new Map();
|
10238
10200
|
this._resolverCache = new Map();
|
10239
10201
|
}
|
10240
|
-
_createClass$1(Config, [{
|
10202
|
+
return _createClass$1(Config, [{
|
10241
10203
|
key: "platform",
|
10242
10204
|
get: function get() {
|
10243
10205
|
return this._config.platform;
|
@@ -10415,7 +10377,6 @@
|
|
10415
10377
|
return isObject(context) ? _attachContext(resolver, context, undefined, descriptorDefaults) : resolver;
|
10416
10378
|
}
|
10417
10379
|
}]);
|
10418
|
-
return Config;
|
10419
10380
|
}();
|
10420
10381
|
function getResolver(resolverCache, scopes, prefixes) {
|
10421
10382
|
var cache = resolverCache.get(scopes);
|
@@ -10465,7 +10426,7 @@
|
|
10465
10426
|
}
|
10466
10427
|
return false;
|
10467
10428
|
}
|
10468
|
-
var version = "4.4.
|
10429
|
+
var version = "4.4.3";
|
10469
10430
|
var KNOWN_POSITIONS = ['top', 'bottom', 'left', 'right', 'chartArea'];
|
10470
10431
|
function positionIsHorizontal(position, axis) {
|
10471
10432
|
return position === 'top' || position === 'bottom' || KNOWN_POSITIONS.indexOf(position) === -1 && axis === 'x';
|
@@ -10601,7 +10562,7 @@
|
|
10601
10562
|
this.update();
|
10602
10563
|
}
|
10603
10564
|
}
|
10604
|
-
_createClass$1(Chart, [{
|
10565
|
+
return _createClass$1(Chart, [{
|
10605
10566
|
key: "aspectRatio",
|
10606
10567
|
get: function get() {
|
10607
10568
|
var _this$options12 = this.options,
|
@@ -11550,7 +11511,6 @@
|
|
11550
11511
|
invalidatePlugins();
|
11551
11512
|
}
|
11552
11513
|
}]);
|
11553
|
-
return Chart;
|
11554
11514
|
}();
|
11555
11515
|
_defineProperty$1(Chart, "defaults", defaults);
|
11556
11516
|
_defineProperty$1(Chart, "instances", instances);
|
@@ -11777,20 +11737,18 @@
|
|
11777
11737
|
ctx.stroke();
|
11778
11738
|
}
|
11779
11739
|
}
|
11780
|
-
var ArcElement = /*#__PURE__*/function (
|
11781
|
-
_inherits$1(ArcElement, _Element2);
|
11782
|
-
var _super12 = _createSuper$1(ArcElement);
|
11740
|
+
var ArcElement = /*#__PURE__*/function (_Element3) {
|
11783
11741
|
function ArcElement(cfg) {
|
11784
11742
|
var _this23;
|
11785
11743
|
_classCallCheck$1(this, ArcElement);
|
11786
|
-
_this23 =
|
11787
|
-
_defineProperty$1(
|
11788
|
-
_defineProperty$1(
|
11789
|
-
_defineProperty$1(
|
11790
|
-
_defineProperty$1(
|
11791
|
-
_defineProperty$1(
|
11792
|
-
_defineProperty$1(
|
11793
|
-
_defineProperty$1(
|
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);
|
11794
11752
|
_this23.options = undefined;
|
11795
11753
|
_this23.circumference = undefined;
|
11796
11754
|
_this23.startAngle = undefined;
|
@@ -11800,11 +11758,12 @@
|
|
11800
11758
|
_this23.pixelMargin = 0;
|
11801
11759
|
_this23.fullCircles = 0;
|
11802
11760
|
if (cfg) {
|
11803
|
-
Object.assign(
|
11761
|
+
Object.assign(_this23, cfg);
|
11804
11762
|
}
|
11805
11763
|
return _this23;
|
11806
11764
|
}
|
11807
|
-
|
11765
|
+
_inherits$1(ArcElement, _Element3);
|
11766
|
+
return _createClass$1(ArcElement, [{
|
11808
11767
|
key: "inRange",
|
11809
11768
|
value: function inRange(chartX, chartY, useFinalPosition) {
|
11810
11769
|
var point = this.getProps(['x', 'y'], useFinalPosition);
|
@@ -11876,7 +11835,6 @@
|
|
11876
11835
|
ctx.restore();
|
11877
11836
|
}
|
11878
11837
|
}]);
|
11879
|
-
return ArcElement;
|
11880
11838
|
}(Element);
|
11881
11839
|
_defineProperty$1(ArcElement, "id", 'arc');
|
11882
11840
|
_defineProperty$1(ArcElement, "defaults", {
|
@@ -12085,13 +12043,11 @@
|
|
12085
12043
|
strokePathDirect(ctx, line, start, count);
|
12086
12044
|
}
|
12087
12045
|
}
|
12088
|
-
var LineElement = /*#__PURE__*/function (
|
12089
|
-
_inherits$1(LineElement, _Element3);
|
12090
|
-
var _super13 = _createSuper$1(LineElement);
|
12046
|
+
var LineElement = /*#__PURE__*/function (_Element4) {
|
12091
12047
|
function LineElement(cfg) {
|
12092
12048
|
var _this24;
|
12093
12049
|
_classCallCheck$1(this, LineElement);
|
12094
|
-
_this24 =
|
12050
|
+
_this24 = _callSuper(this, LineElement);
|
12095
12051
|
_this24.animated = true;
|
12096
12052
|
_this24.options = undefined;
|
12097
12053
|
_this24._chart = undefined;
|
@@ -12104,11 +12060,12 @@
|
|
12104
12060
|
_this24._pointsUpdated = false;
|
12105
12061
|
_this24._datasetIndex = undefined;
|
12106
12062
|
if (cfg) {
|
12107
|
-
Object.assign(
|
12063
|
+
Object.assign(_this24, cfg);
|
12108
12064
|
}
|
12109
12065
|
return _this24;
|
12110
12066
|
}
|
12111
|
-
|
12067
|
+
_inherits$1(LineElement, _Element4);
|
12068
|
+
return _createClass$1(LineElement, [{
|
12112
12069
|
key: "updateControlPoints",
|
12113
12070
|
value: function updateControlPoints(chartArea, indexAxis) {
|
12114
12071
|
var options = this.options;
|
@@ -12230,7 +12187,6 @@
|
|
12230
12187
|
}
|
12231
12188
|
}
|
12232
12189
|
}]);
|
12233
|
-
return LineElement;
|
12234
12190
|
}(Element);
|
12235
12191
|
_defineProperty$1(LineElement, "id", 'line');
|
12236
12192
|
_defineProperty$1(LineElement, "defaults", {
|
@@ -12262,26 +12218,25 @@
|
|
12262
12218
|
value = _el$getProps[axis];
|
12263
12219
|
return Math.abs(pos - value) < options.radius + options.hitRadius;
|
12264
12220
|
}
|
12265
|
-
var PointElement = /*#__PURE__*/function (
|
12266
|
-
_inherits$1(PointElement, _Element4);
|
12267
|
-
var _super14 = _createSuper$1(PointElement);
|
12221
|
+
var PointElement = /*#__PURE__*/function (_Element5) {
|
12268
12222
|
function PointElement(cfg) {
|
12269
12223
|
var _this25;
|
12270
12224
|
_classCallCheck$1(this, PointElement);
|
12271
|
-
_this25 =
|
12272
|
-
_defineProperty$1(
|
12273
|
-
_defineProperty$1(
|
12274
|
-
_defineProperty$1(
|
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);
|
12275
12229
|
_this25.options = undefined;
|
12276
12230
|
_this25.parsed = undefined;
|
12277
12231
|
_this25.skip = undefined;
|
12278
12232
|
_this25.stop = undefined;
|
12279
12233
|
if (cfg) {
|
12280
|
-
Object.assign(
|
12234
|
+
Object.assign(_this25, cfg);
|
12281
12235
|
}
|
12282
12236
|
return _this25;
|
12283
12237
|
}
|
12284
|
-
|
12238
|
+
_inherits$1(PointElement, _Element5);
|
12239
|
+
return _createClass$1(PointElement, [{
|
12285
12240
|
key: "inRange",
|
12286
12241
|
value: function inRange(mouseX, mouseY, useFinalPosition) {
|
12287
12242
|
var options = this.options;
|
@@ -12340,7 +12295,6 @@
|
|
12340
12295
|
return options.radius + options.hitRadius;
|
12341
12296
|
}
|
12342
12297
|
}]);
|
12343
|
-
return PointElement;
|
12344
12298
|
}(Element);
|
12345
12299
|
_defineProperty$1(PointElement, "id", 'point');
|
12346
12300
|
/**
|
@@ -12474,13 +12428,11 @@
|
|
12474
12428
|
radius: rect.radius
|
12475
12429
|
};
|
12476
12430
|
}
|
12477
|
-
var BarElement = /*#__PURE__*/function (
|
12478
|
-
_inherits$1(BarElement, _Element5);
|
12479
|
-
var _super15 = _createSuper$1(BarElement);
|
12431
|
+
var BarElement = /*#__PURE__*/function (_Element6) {
|
12480
12432
|
function BarElement(cfg) {
|
12481
12433
|
var _this26;
|
12482
12434
|
_classCallCheck$1(this, BarElement);
|
12483
|
-
_this26 =
|
12435
|
+
_this26 = _callSuper(this, BarElement);
|
12484
12436
|
_this26.options = undefined;
|
12485
12437
|
_this26.horizontal = undefined;
|
12486
12438
|
_this26.base = undefined;
|
@@ -12488,11 +12440,12 @@
|
|
12488
12440
|
_this26.height = undefined;
|
12489
12441
|
_this26.inflateAmount = undefined;
|
12490
12442
|
if (cfg) {
|
12491
|
-
Object.assign(
|
12443
|
+
Object.assign(_this26, cfg);
|
12492
12444
|
}
|
12493
12445
|
return _this26;
|
12494
12446
|
}
|
12495
|
-
|
12447
|
+
_inherits$1(BarElement, _Element6);
|
12448
|
+
return _createClass$1(BarElement, [{
|
12496
12449
|
key: "draw",
|
12497
12450
|
value: function draw(ctx) {
|
12498
12451
|
var inflateAmount = this.inflateAmount,
|
@@ -12552,7 +12505,6 @@
|
|
12552
12505
|
return axis === 'x' ? this.width / 2 : this.height / 2;
|
12553
12506
|
}
|
12554
12507
|
}]);
|
12555
|
-
return BarElement;
|
12556
12508
|
}(Element);
|
12557
12509
|
_defineProperty$1(BarElement, "id", 'bar');
|
12558
12510
|
_defineProperty$1(BarElement, "defaults", {
|
@@ -13182,7 +13134,7 @@
|
|
13182
13134
|
this.y = opts.y;
|
13183
13135
|
this.radius = opts.radius;
|
13184
13136
|
}
|
13185
|
-
_createClass$1(simpleArc, [{
|
13137
|
+
return _createClass$1(simpleArc, [{
|
13186
13138
|
key: "pathSegment",
|
13187
13139
|
value: function pathSegment(ctx, bounds, opts) {
|
13188
13140
|
var x = this.x,
|
@@ -13209,7 +13161,6 @@
|
|
13209
13161
|
};
|
13210
13162
|
}
|
13211
13163
|
}]);
|
13212
|
-
return simpleArc;
|
13213
13164
|
}();
|
13214
13165
|
function _getTarget(source) {
|
13215
13166
|
var chart = source.chart,
|
@@ -13536,13 +13487,11 @@
|
|
13536
13487
|
var itemsEqual = function itemsEqual(a, b) {
|
13537
13488
|
return a !== null && b !== null && a.datasetIndex === b.datasetIndex && a.index === b.index;
|
13538
13489
|
};
|
13539
|
-
var Legend = /*#__PURE__*/function (
|
13540
|
-
_inherits$1(Legend, _Element6);
|
13541
|
-
var _super16 = _createSuper$1(Legend);
|
13490
|
+
var Legend = /*#__PURE__*/function (_Element7) {
|
13542
13491
|
function Legend(config) {
|
13543
13492
|
var _this27;
|
13544
13493
|
_classCallCheck$1(this, Legend);
|
13545
|
-
_this27 =
|
13494
|
+
_this27 = _callSuper(this, Legend);
|
13546
13495
|
_this27._added = false;
|
13547
13496
|
_this27.legendHitBoxes = [];
|
13548
13497
|
_this27._hoveredItem = null;
|
@@ -13567,7 +13516,8 @@
|
|
13567
13516
|
_this27.fullSize = undefined;
|
13568
13517
|
return _this27;
|
13569
13518
|
}
|
13570
|
-
|
13519
|
+
_inherits$1(Legend, _Element7);
|
13520
|
+
return _createClass$1(Legend, [{
|
13571
13521
|
key: "update",
|
13572
13522
|
value: function update(maxWidth, maxHeight, margins) {
|
13573
13523
|
this.maxWidth = maxWidth;
|
@@ -14004,7 +13954,6 @@
|
|
14004
13954
|
}
|
14005
13955
|
}
|
14006
13956
|
}]);
|
14007
|
-
return Legend;
|
14008
13957
|
}(Element);
|
14009
13958
|
function calculateItemSize(boxWidth, labelFont, ctx, legendItem, _itemHeight) {
|
14010
13959
|
var itemWidth = calculateItemWidth(legendItem, boxWidth, labelFont, ctx);
|
@@ -14152,13 +14101,11 @@
|
|
14152
14101
|
}
|
14153
14102
|
}
|
14154
14103
|
};
|
14155
|
-
var Title = /*#__PURE__*/function (
|
14156
|
-
_inherits$1(Title, _Element7);
|
14157
|
-
var _super17 = _createSuper$1(Title);
|
14104
|
+
var Title = /*#__PURE__*/function (_Element8) {
|
14158
14105
|
function Title(config) {
|
14159
14106
|
var _this30;
|
14160
14107
|
_classCallCheck$1(this, Title);
|
14161
|
-
_this30 =
|
14108
|
+
_this30 = _callSuper(this, Title);
|
14162
14109
|
_this30.chart = config.chart;
|
14163
14110
|
_this30.options = config.options;
|
14164
14111
|
_this30.ctx = config.ctx;
|
@@ -14174,7 +14121,8 @@
|
|
14174
14121
|
_this30.fullSize = undefined;
|
14175
14122
|
return _this30;
|
14176
14123
|
}
|
14177
|
-
|
14124
|
+
_inherits$1(Title, _Element8);
|
14125
|
+
return _createClass$1(Title, [{
|
14178
14126
|
key: "update",
|
14179
14127
|
value: function update(maxWidth, maxHeight) {
|
14180
14128
|
var opts = this.options;
|
@@ -14261,7 +14209,6 @@
|
|
14261
14209
|
});
|
14262
14210
|
}
|
14263
14211
|
}]);
|
14264
|
-
return Title;
|
14265
14212
|
}(Element);
|
14266
14213
|
function createTitle(chart, titleOpts) {
|
14267
14214
|
var title = new Title({
|
@@ -14357,20 +14304,23 @@
|
|
14357
14304
|
return false;
|
14358
14305
|
}
|
14359
14306
|
var i, len;
|
14360
|
-
var
|
14307
|
+
var xSet = new Set();
|
14361
14308
|
var y = 0;
|
14362
14309
|
var count = 0;
|
14363
14310
|
for (i = 0, len = items.length; i < len; ++i) {
|
14364
14311
|
var el = items[i].element;
|
14365
14312
|
if (el && el.hasValue()) {
|
14366
14313
|
var pos = el.tooltipPosition();
|
14367
|
-
|
14314
|
+
xSet.add(pos.x);
|
14368
14315
|
y += pos.y;
|
14369
14316
|
++count;
|
14370
14317
|
}
|
14371
14318
|
}
|
14319
|
+
var xAverage = _toConsumableArray(xSet).reduce(function (a, b) {
|
14320
|
+
return a + b;
|
14321
|
+
}) / xSet.size;
|
14372
14322
|
return {
|
14373
|
-
x:
|
14323
|
+
x: xAverage,
|
14374
14324
|
y: y / count
|
14375
14325
|
};
|
14376
14326
|
},
|
@@ -14683,13 +14633,11 @@
|
|
14683
14633
|
}
|
14684
14634
|
return result;
|
14685
14635
|
}
|
14686
|
-
var Tooltip = /*#__PURE__*/function (
|
14687
|
-
_inherits$1(Tooltip, _Element8);
|
14688
|
-
var _super18 = _createSuper$1(Tooltip);
|
14636
|
+
var Tooltip = /*#__PURE__*/function (_Element9) {
|
14689
14637
|
function Tooltip(config) {
|
14690
14638
|
var _this31;
|
14691
14639
|
_classCallCheck$1(this, Tooltip);
|
14692
|
-
_this31 =
|
14640
|
+
_this31 = _callSuper(this, Tooltip);
|
14693
14641
|
_this31.opacity = 0;
|
14694
14642
|
_this31._active = [];
|
14695
14643
|
_this31._eventPosition = undefined;
|
@@ -14719,7 +14667,8 @@
|
|
14719
14667
|
_this31.labelTextColors = undefined;
|
14720
14668
|
return _this31;
|
14721
14669
|
}
|
14722
|
-
|
14670
|
+
_inherits$1(Tooltip, _Element9);
|
14671
|
+
return _createClass$1(Tooltip, [{
|
14723
14672
|
key: "initialize",
|
14724
14673
|
value: function initialize(options) {
|
14725
14674
|
this.options = options;
|
@@ -15316,7 +15265,6 @@
|
|
15316
15265
|
return position !== false && (caretX !== position.x || caretY !== position.y);
|
15317
15266
|
}
|
15318
15267
|
}]);
|
15319
|
-
return Tooltip;
|
15320
15268
|
}(Element);
|
15321
15269
|
_defineProperty$1(Tooltip, "positioners", positioners);
|
15322
15270
|
var plugin_tooltip = {
|
@@ -15482,18 +15430,17 @@
|
|
15482
15430
|
return value;
|
15483
15431
|
}
|
15484
15432
|
var CategoryScale = /*#__PURE__*/function (_Scale) {
|
15485
|
-
_inherits$1(CategoryScale, _Scale);
|
15486
|
-
var _super19 = _createSuper$1(CategoryScale);
|
15487
15433
|
function CategoryScale(cfg) {
|
15488
15434
|
var _this36;
|
15489
15435
|
_classCallCheck$1(this, CategoryScale);
|
15490
|
-
_this36 =
|
15436
|
+
_this36 = _callSuper(this, CategoryScale, [cfg]);
|
15491
15437
|
_this36._startValue = undefined;
|
15492
15438
|
_this36._valueRange = 0;
|
15493
15439
|
_this36._addedLabels = [];
|
15494
15440
|
return _this36;
|
15495
15441
|
}
|
15496
|
-
|
15442
|
+
_inherits$1(CategoryScale, _Scale);
|
15443
|
+
return _createClass$1(CategoryScale, [{
|
15497
15444
|
key: "init",
|
15498
15445
|
value: function init(scaleOptions) {
|
15499
15446
|
var added = this._addedLabels;
|
@@ -15608,7 +15555,6 @@
|
|
15608
15555
|
return this.bottom;
|
15609
15556
|
}
|
15610
15557
|
}]);
|
15611
|
-
return CategoryScale;
|
15612
15558
|
}(Scale);
|
15613
15559
|
_defineProperty$1(CategoryScale, "id", 'category');
|
15614
15560
|
_defineProperty$1(CategoryScale, "defaults", {
|
@@ -15731,12 +15677,10 @@
|
|
15731
15677
|
return Math.min(minSpacing / ratio, length);
|
15732
15678
|
}
|
15733
15679
|
var LinearScaleBase = /*#__PURE__*/function (_Scale2) {
|
15734
|
-
_inherits$1(LinearScaleBase, _Scale2);
|
15735
|
-
var _super20 = _createSuper$1(LinearScaleBase);
|
15736
15680
|
function LinearScaleBase(cfg) {
|
15737
15681
|
var _this37;
|
15738
15682
|
_classCallCheck$1(this, LinearScaleBase);
|
15739
|
-
_this37 =
|
15683
|
+
_this37 = _callSuper(this, LinearScaleBase, [cfg]);
|
15740
15684
|
_this37.start = undefined;
|
15741
15685
|
_this37.end = undefined;
|
15742
15686
|
_this37._startValue = undefined;
|
@@ -15744,7 +15688,8 @@
|
|
15744
15688
|
_this37._valueRange = 0;
|
15745
15689
|
return _this37;
|
15746
15690
|
}
|
15747
|
-
|
15691
|
+
_inherits$1(LinearScaleBase, _Scale2);
|
15692
|
+
return _createClass$1(LinearScaleBase, [{
|
15748
15693
|
key: "parse",
|
15749
15694
|
value: function parse(raw, index) {
|
15750
15695
|
if (isNullOrUndef(raw)) {
|
@@ -15873,16 +15818,14 @@
|
|
15873
15818
|
return formatNumber(value, this.chart.options.locale, this.options.ticks.format);
|
15874
15819
|
}
|
15875
15820
|
}]);
|
15876
|
-
return LinearScaleBase;
|
15877
15821
|
}(Scale);
|
15878
15822
|
var LinearScale = /*#__PURE__*/function (_LinearScaleBase) {
|
15879
|
-
_inherits$1(LinearScale, _LinearScaleBase);
|
15880
|
-
var _super21 = _createSuper$1(LinearScale);
|
15881
15823
|
function LinearScale() {
|
15882
15824
|
_classCallCheck$1(this, LinearScale);
|
15883
|
-
return
|
15825
|
+
return _callSuper(this, LinearScale, arguments);
|
15884
15826
|
}
|
15885
|
-
|
15827
|
+
_inherits$1(LinearScale, _LinearScaleBase);
|
15828
|
+
return _createClass$1(LinearScale, [{
|
15886
15829
|
key: "determineDataLimits",
|
15887
15830
|
value: function determineDataLimits() {
|
15888
15831
|
var _this$getMinMax2 = this.getMinMax(true),
|
@@ -15913,7 +15856,6 @@
|
|
15913
15856
|
return this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;
|
15914
15857
|
}
|
15915
15858
|
}]);
|
15916
|
-
return LinearScale;
|
15917
15859
|
}(LinearScaleBase);
|
15918
15860
|
_defineProperty$1(LinearScale, "id", 'linear');
|
15919
15861
|
_defineProperty$1(LinearScale, "defaults", {
|
@@ -15989,19 +15931,18 @@
|
|
15989
15931
|
return ticks;
|
15990
15932
|
}
|
15991
15933
|
var LogarithmicScale = /*#__PURE__*/function (_Scale3) {
|
15992
|
-
_inherits$1(LogarithmicScale, _Scale3);
|
15993
|
-
var _super22 = _createSuper$1(LogarithmicScale);
|
15994
15934
|
function LogarithmicScale(cfg) {
|
15995
15935
|
var _this38;
|
15996
15936
|
_classCallCheck$1(this, LogarithmicScale);
|
15997
|
-
_this38 =
|
15937
|
+
_this38 = _callSuper(this, LogarithmicScale, [cfg]);
|
15998
15938
|
_this38.start = undefined;
|
15999
15939
|
_this38.end = undefined;
|
16000
15940
|
_this38._startValue = undefined;
|
16001
15941
|
_this38._valueRange = 0;
|
16002
15942
|
return _this38;
|
16003
15943
|
}
|
16004
|
-
|
15944
|
+
_inherits$1(LogarithmicScale, _Scale3);
|
15945
|
+
return _createClass$1(LogarithmicScale, [{
|
16005
15946
|
key: "parse",
|
16006
15947
|
value: function parse(raw, index) {
|
16007
15948
|
var value = LinearScaleBase.prototype.parse.apply(this, [raw, index]);
|
@@ -16112,7 +16053,6 @@
|
|
16112
16053
|
return Math.pow(10, this._startValue + decimal * this._valueRange);
|
16113
16054
|
}
|
16114
16055
|
}]);
|
16115
|
-
return LogarithmicScale;
|
16116
16056
|
}(Scale);
|
16117
16057
|
_defineProperty$1(LogarithmicScale, "id", 'logarithmic');
|
16118
16058
|
_defineProperty$1(LogarithmicScale, "defaults", {
|
@@ -16391,12 +16331,10 @@
|
|
16391
16331
|
});
|
16392
16332
|
}
|
16393
16333
|
var RadialLinearScale = /*#__PURE__*/function (_LinearScaleBase2) {
|
16394
|
-
_inherits$1(RadialLinearScale, _LinearScaleBase2);
|
16395
|
-
var _super23 = _createSuper$1(RadialLinearScale);
|
16396
16334
|
function RadialLinearScale(cfg) {
|
16397
16335
|
var _this39;
|
16398
16336
|
_classCallCheck$1(this, RadialLinearScale);
|
16399
|
-
_this39 =
|
16337
|
+
_this39 = _callSuper(this, RadialLinearScale, [cfg]);
|
16400
16338
|
_this39.xCenter = undefined;
|
16401
16339
|
_this39.yCenter = undefined;
|
16402
16340
|
_this39.drawingArea = undefined;
|
@@ -16404,7 +16342,8 @@
|
|
16404
16342
|
_this39._pointLabelItems = [];
|
16405
16343
|
return _this39;
|
16406
16344
|
}
|
16407
|
-
|
16345
|
+
_inherits$1(RadialLinearScale, _LinearScaleBase2);
|
16346
|
+
return _createClass$1(RadialLinearScale, [{
|
16408
16347
|
key: "setDimensions",
|
16409
16348
|
value: function setDimensions() {
|
16410
16349
|
var padding = this._padding = toPadding(getTickBackdropHeight(this.options) / 2);
|
@@ -16564,7 +16503,7 @@
|
|
16564
16503
|
}
|
16565
16504
|
if (grid.display) {
|
16566
16505
|
this.ticks.forEach(function (tick, index) {
|
16567
|
-
if (index !== 0) {
|
16506
|
+
if (index !== 0 || index === 0 && _this41.min < 0) {
|
16568
16507
|
offset = _this41.getDistanceFromCenterForValue(tick.value);
|
16569
16508
|
var context = _this41.getContext(index);
|
16570
16509
|
var optsAtIndex = grid.setContext(context);
|
@@ -16617,7 +16556,7 @@
|
|
16617
16556
|
ctx.textAlign = 'center';
|
16618
16557
|
ctx.textBaseline = 'middle';
|
16619
16558
|
this.ticks.forEach(function (tick, index) {
|
16620
|
-
if (index === 0 && !opts.reverse) {
|
16559
|
+
if (index === 0 && _this42.min >= 0 && !opts.reverse) {
|
16621
16560
|
return;
|
16622
16561
|
}
|
16623
16562
|
var optsAtIndex = tickOpts.setContext(_this42.getContext(index));
|
@@ -16642,7 +16581,6 @@
|
|
16642
16581
|
key: "drawTitle",
|
16643
16582
|
value: function drawTitle() {}
|
16644
16583
|
}]);
|
16645
|
-
return RadialLinearScale;
|
16646
16584
|
}(LinearScaleBase);
|
16647
16585
|
_defineProperty$1(RadialLinearScale, "id", 'radialLinear');
|
16648
16586
|
_defineProperty$1(RadialLinearScale, "defaults", {
|
@@ -16828,12 +16766,10 @@
|
|
16828
16766
|
return ilen === 0 || !majorUnit ? ticks : setMajorTicks(scale, ticks, map, majorUnit);
|
16829
16767
|
}
|
16830
16768
|
var TimeScale = /*#__PURE__*/function (_Scale4) {
|
16831
|
-
_inherits$1(TimeScale, _Scale4);
|
16832
|
-
var _super24 = _createSuper$1(TimeScale);
|
16833
16769
|
function TimeScale(props) {
|
16834
16770
|
var _this43;
|
16835
16771
|
_classCallCheck$1(this, TimeScale);
|
16836
|
-
_this43 =
|
16772
|
+
_this43 = _callSuper(this, TimeScale, [props]);
|
16837
16773
|
_this43._cache = {
|
16838
16774
|
data: [],
|
16839
16775
|
labels: [],
|
@@ -16846,7 +16782,8 @@
|
|
16846
16782
|
_this43._parseOpts = undefined;
|
16847
16783
|
return _this43;
|
16848
16784
|
}
|
16849
|
-
|
16785
|
+
_inherits$1(TimeScale, _Scale4);
|
16786
|
+
return _createClass$1(TimeScale, [{
|
16850
16787
|
key: "init",
|
16851
16788
|
value: function init(scaleOpts) {
|
16852
16789
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
@@ -17145,7 +17082,6 @@
|
|
17145
17082
|
return _arrayUnique(values.sort(sorter));
|
17146
17083
|
}
|
17147
17084
|
}]);
|
17148
|
-
return TimeScale;
|
17149
17085
|
}(Scale);
|
17150
17086
|
_defineProperty$1(TimeScale, "id", 'time');
|
17151
17087
|
_defineProperty$1(TimeScale, "defaults", {
|
@@ -17199,19 +17135,18 @@
|
|
17199
17135
|
var span = nextSource - prevSource;
|
17200
17136
|
return span ? prevTarget + (nextTarget - prevTarget) * (val - prevSource) / span : prevTarget;
|
17201
17137
|
}
|
17202
|
-
var TimeSeriesScale = /*#__PURE__*/function (
|
17203
|
-
_inherits$1(TimeSeriesScale, _TimeScale);
|
17204
|
-
var _super25 = _createSuper$1(TimeSeriesScale);
|
17138
|
+
var TimeSeriesScale = /*#__PURE__*/function (_TimeScale2) {
|
17205
17139
|
function TimeSeriesScale(props) {
|
17206
17140
|
var _this44;
|
17207
17141
|
_classCallCheck$1(this, TimeSeriesScale);
|
17208
|
-
_this44 =
|
17142
|
+
_this44 = _callSuper(this, TimeSeriesScale, [props]);
|
17209
17143
|
_this44._table = [];
|
17210
17144
|
_this44._minPos = undefined;
|
17211
17145
|
_this44._tableRange = undefined;
|
17212
17146
|
return _this44;
|
17213
17147
|
}
|
17214
|
-
|
17148
|
+
_inherits$1(TimeSeriesScale, _TimeScale2);
|
17149
|
+
return _createClass$1(TimeSeriesScale, [{
|
17215
17150
|
key: "initOffsets",
|
17216
17151
|
value: function initOffsets() {
|
17217
17152
|
var timestamps = this._getTimestampsForTable();
|
@@ -17302,7 +17237,6 @@
|
|
17302
17237
|
return interpolate(this._table, decimal * this._tableRange + this._minPos, true);
|
17303
17238
|
}
|
17304
17239
|
}]);
|
17305
|
-
return TimeSeriesScale;
|
17306
17240
|
}(TimeScale);
|
17307
17241
|
_defineProperty$1(TimeSeriesScale, "id", 'timeseries');
|
17308
17242
|
_defineProperty$1(TimeSeriesScale, "defaults", TimeScale.defaults);
|
@@ -20995,15 +20929,12 @@
|
|
20995
20929
|
}
|
20996
20930
|
|
20997
20931
|
function _isNativeReflectConstruct() {
|
20998
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
20999
|
-
if (Reflect.construct.sham) return false;
|
21000
|
-
if (typeof Proxy === "function") return true;
|
21001
20932
|
try {
|
21002
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
21003
|
-
|
21004
|
-
|
21005
|
-
return
|
21006
|
-
}
|
20933
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
20934
|
+
} catch (t) {}
|
20935
|
+
return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
|
20936
|
+
return !!t;
|
20937
|
+
})();
|
21007
20938
|
}
|
21008
20939
|
|
21009
20940
|
function _possibleConstructorReturn(self, call) {
|
@@ -21036,20 +20967,20 @@
|
|
21036
20967
|
}
|
21037
20968
|
}
|
21038
20969
|
|
21039
|
-
function
|
21040
|
-
if (
|
21041
|
-
var
|
21042
|
-
if (
|
21043
|
-
var
|
21044
|
-
if (
|
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;
|
21045
20976
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
21046
20977
|
}
|
21047
|
-
return (
|
20978
|
+
return ("string" === r ? String : Number)(t);
|
21048
20979
|
}
|
21049
20980
|
|
21050
|
-
function
|
21051
|
-
var
|
21052
|
-
return _typeof(
|
20981
|
+
function toPropertyKey(t) {
|
20982
|
+
var i = toPrimitive(t, "string");
|
20983
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
21053
20984
|
}
|
21054
20985
|
|
21055
20986
|
function _defineProperties(target, props) {
|
@@ -21058,7 +20989,7 @@
|
|
21058
20989
|
descriptor.enumerable = descriptor.enumerable || false;
|
21059
20990
|
descriptor.configurable = true;
|
21060
20991
|
if ("value" in descriptor) descriptor.writable = true;
|
21061
|
-
Object.defineProperty(target,
|
20992
|
+
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
21062
20993
|
}
|
21063
20994
|
}
|
21064
20995
|
function _createClass(Constructor, protoProps, staticProps) {
|
@@ -21071,7 +21002,7 @@
|
|
21071
21002
|
}
|
21072
21003
|
|
21073
21004
|
function _defineProperty(obj, key, value) {
|
21074
|
-
key =
|
21005
|
+
key = toPropertyKey(key);
|
21075
21006
|
if (key in obj) {
|
21076
21007
|
Object.defineProperty(obj, key, {
|
21077
21008
|
value: value,
|