chartkick 5.0.4 → 5.0.5

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: 63023f3430e85adec8b4f0082ccf11ff8ce7033c7cdbb85183e444860d432bed
4
- data.tar.gz: a8363b343ef5a03d016b02f1e0daeb0f7a4d020dd1fea83e02d5d137726f6c91
3
+ metadata.gz: b4c12b23eada9f3616245b3db795ebe98d71f7edc9cc3a325ff5359c8998ccf7
4
+ data.tar.gz: 1af2f8289b768f28847bf6c75e61f3803ed43a3850d7e52d990381f43440a95d
5
5
  SHA512:
6
- metadata.gz: 7aea2637834ab508858d53f3e0802a72d437adc41715adc00fdda62b207ac46838256e93ec1f6c105de186d13ed88210d881dd95fdf6cbbb35ed58fe3d98d58d
7
- data.tar.gz: 83f8bad0d4a81b6540315230c900c31882b03fabb462f2d2b8e1e8750ffbee12626e01f5606ae50caa2768d8007a528556eab6944ba5899a55156892ff2e7900
6
+ metadata.gz: efb010cad8e5501514b25debf313ea6e9ed4facc5d6d1feae5c914d3e0ebc72485a64659bca83cdc772709e96eea6b70773e80dd98187c0c66a4aecf984b0e65
7
+ data.tar.gz: ca7305dbb9765f35c1e085e11d40d3ab95527215f11dd88a0efb9007fb40cdeaf3808ee4ed4c3db1dbb2deb7d9e180d83beb7345e68012b70d65b2f92399f5c2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 5.0.5 (2023-12-07)
2
+
3
+ - Updated Chart.js to 4.4.1
4
+
1
5
  ## 5.0.4 (2023-08-27)
2
6
 
3
7
  - Updated Chart.js to 4.4.0
data/README.md CHANGED
@@ -4,13 +4,11 @@ Create beautiful JavaScript charts with one line of Ruby. No more fighting with
4
4
 
5
5
  [See it in action](https://chartkick.com)
6
6
 
7
- **Chartkick 5.0 was recently released** - see [how to upgrade](#upgrading)
8
-
9
7
  :fire: For admin charts and dashboards, check out [Blazer](https://github.com/ankane/blazer/), and for advanced visualizations, check out [Vega](https://github.com/ankane/vega)
10
8
 
11
9
  :two_hearts: A perfect companion to [Groupdate](https://github.com/ankane/groupdate), [Hightop](https://github.com/ankane/hightop), and [ActiveMedian](https://github.com/ankane/active_median)
12
10
 
13
- [![Build Status](https://github.com/ankane/chartkick/workflows/build/badge.svg?branch=master)](https://github.com/ankane/chartkick/actions)
11
+ [![Build Status](https://github.com/ankane/chartkick/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/chartkick/actions)
14
12
 
15
13
  ## Quick Start
16
14
 
@@ -347,7 +345,7 @@ You can pass options directly to the charting library with:
347
345
  <%= line_chart data, library: {backgroundColor: "#eee"} %>
348
346
  ```
349
347
 
350
- See the documentation for [Chart.js](https://www.chartjs.org/docs/), [Google Charts](https://developers.google.com/chart/interactive/docs/gallery), and [Highcharts](https://api.highcharts.com/highcharts) for more info.
348
+ See the documentation for [Chart.js](https://www.chartjs.org/docs/), [Google Charts](https://developers.google.com/chart/interactive/docs/gallery), and [Highcharts](https://api.highcharts.com/highcharts) for more info. For Chart.js plugins, check out [this guide](guides/Chartjs-Plugins.md).
351
349
 
352
350
  To customize datasets in Chart.js, use:
353
351
 
@@ -1,3 +1,3 @@
1
1
  module Chartkick
2
- VERSION = "5.0.4"
2
+ VERSION = "5.0.5"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chart.js v4.4.0
2
+ * Chart.js v4.4.1
3
3
  * https://www.chartjs.org
4
4
  * (c) 2023 Chart.js Contributors
5
5
  * Released under the MIT License
@@ -26,62 +26,62 @@
26
26
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Chart = factory());
27
27
  })(this, (function () { 'use strict';
28
28
 
29
- function _iterableToArrayLimit(arr, i) {
30
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
31
- if (null != _i) {
32
- var _s,
33
- _e,
34
- _x,
35
- _r,
36
- _arr = [],
37
- _n = !0,
38
- _d = !1;
29
+ function _iterableToArrayLimit(r, l) {
30
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
31
+ if (null != t) {
32
+ var e,
33
+ n,
34
+ i,
35
+ u,
36
+ a = [],
37
+ f = !0,
38
+ o = !1;
39
39
  try {
40
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
41
- if (Object(_i) !== _i) return;
42
- _n = !1;
43
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
44
- } catch (err) {
45
- _d = !0, _e = err;
40
+ if (i = (t = t.call(r)).next, 0 === l) {
41
+ if (Object(t) !== t) return;
42
+ f = !1;
43
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
44
+ } catch (r) {
45
+ o = !0, n = r;
46
46
  } finally {
47
47
  try {
48
- if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
48
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
49
49
  } finally {
50
- if (_d) throw _e;
50
+ if (o) throw n;
51
51
  }
52
52
  }
53
- return _arr;
53
+ return a;
54
54
  }
55
55
  }
56
- function ownKeys(object, enumerableOnly) {
57
- var keys = Object.keys(object);
56
+ function ownKeys(e, r) {
57
+ var t = Object.keys(e);
58
58
  if (Object.getOwnPropertySymbols) {
59
- var symbols = Object.getOwnPropertySymbols(object);
60
- enumerableOnly && (symbols = symbols.filter(function (sym) {
61
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
62
- })), keys.push.apply(keys, symbols);
63
- }
64
- return keys;
65
- }
66
- function _objectSpread2(target) {
67
- for (var i = 1; i < arguments.length; i++) {
68
- var source = null != arguments[i] ? arguments[i] : {};
69
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
70
- _defineProperty$1(target, key, source[key]);
71
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
72
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
59
+ var o = Object.getOwnPropertySymbols(e);
60
+ r && (o = o.filter(function (r) {
61
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
62
+ })), t.push.apply(t, o);
63
+ }
64
+ return t;
65
+ }
66
+ function _objectSpread2(e) {
67
+ for (var r = 1; r < arguments.length; r++) {
68
+ var t = null != arguments[r] ? arguments[r] : {};
69
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
70
+ _defineProperty$1(e, r, t[r]);
71
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
72
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
73
73
  });
74
74
  }
75
- return target;
75
+ return e;
76
76
  }
77
- function _typeof$1(obj) {
77
+ function _typeof$1(o) {
78
78
  "@babel/helpers - typeof";
79
79
 
80
- return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
81
- return typeof obj;
82
- } : function (obj) {
83
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
84
- }, _typeof$1(obj);
80
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
81
+ return typeof o;
82
+ } : function (o) {
83
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
84
+ }, _typeof$1(o);
85
85
  }
86
86
  function _classCallCheck$1(instance, Constructor) {
87
87
  if (!(instance instanceof Constructor)) {
@@ -1403,7 +1403,6 @@
1403
1403
  if (angle < -0.5 * PI) {
1404
1404
  angle += TAU; // make sure the returned angle is in the range of (-PI/2, 3PI/2]
1405
1405
  }
1406
-
1407
1406
  return {
1408
1407
  angle: angle,
1409
1408
  distance: radialDistanceFromCenter
@@ -2194,14 +2193,13 @@
2194
2193
  }, {
2195
2194
  key: "route",
2196
2195
  value: function route(scope, name, targetScope, targetName) {
2197
- var _Object$definePropert;
2198
2196
  var scopeObject = getScope$1(this, scope);
2199
2197
  var targetScopeObject = getScope$1(this, targetScope);
2200
2198
  var privateName = '_' + name;
2201
- Object.defineProperties(scopeObject, (_Object$definePropert = {}, _defineProperty$1(_Object$definePropert, privateName, {
2199
+ Object.defineProperties(scopeObject, _defineProperty$1(_defineProperty$1({}, privateName, {
2202
2200
  value: scopeObject[name],
2203
2201
  writable: true
2204
- }), _defineProperty$1(_Object$definePropert, name, {
2202
+ }), name, {
2205
2203
  enumerable: true,
2206
2204
  get: function get() {
2207
2205
  var local = this[privateName];
@@ -2214,7 +2212,7 @@
2214
2212
  set: function set(value) {
2215
2213
  this[privateName] = value;
2216
2214
  }
2217
- }), _Object$definePropert));
2215
+ }));
2218
2216
  }
2219
2217
  }, {
2220
2218
  key: "apply",
@@ -2820,7 +2818,6 @@
2820
2818
  * @private
2821
2819
  */
2822
2820
  function _createResolver(scopes) {
2823
- var _cache;
2824
2821
  var prefixes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [''];
2825
2822
  var rootScopes = arguments.length > 2 ? arguments[2] : undefined;
2826
2823
  var fallback = arguments.length > 3 ? arguments[3] : undefined;
@@ -2831,9 +2828,9 @@
2831
2828
  if (typeof fallback === 'undefined') {
2832
2829
  fallback = _resolve('_fallback', scopes);
2833
2830
  }
2834
- var cache = (_cache = {}, _defineProperty$1(_cache, Symbol.toStringTag, 'Object'), _defineProperty$1(_cache, "_cacheable", true), _defineProperty$1(_cache, "_scopes", scopes), _defineProperty$1(_cache, "_rootScopes", finalRootScopes), _defineProperty$1(_cache, "_fallback", fallback), _defineProperty$1(_cache, "_getTarget", getTarget), _defineProperty$1(_cache, "override", function override(scope) {
2831
+ var cache = _defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1({}, Symbol.toStringTag, 'Object'), "_cacheable", true), "_scopes", scopes), "_rootScopes", finalRootScopes), "_fallback", fallback), "_getTarget", getTarget), "override", function override(scope) {
2835
2832
  return _createResolver([scope].concat(_toConsumableArray(scopes)), prefixes, finalRootScopes, fallback);
2836
- }), _cache);
2833
+ });
2837
2834
  return new Proxy(cache, {
2838
2835
  /**
2839
2836
  * A trap for the delete operator.
@@ -3634,8 +3631,10 @@
3634
3631
  return false;
3635
3632
  }
3636
3633
  };
3637
- window.addEventListener('test', null, options);
3638
- window.removeEventListener('test', null, options);
3634
+ if (_isDomSupported()) {
3635
+ window.addEventListener('test', null, options);
3636
+ window.removeEventListener('test', null, options);
3637
+ }
3639
3638
  } catch (e) {
3640
3639
  // continue regardless of error
3641
3640
  }
@@ -4922,9 +4921,8 @@
4922
4921
  var parsed = new Array(count);
4923
4922
  var i, ilen, index;
4924
4923
  for (i = 0, ilen = count; i < ilen; ++i) {
4925
- var _parsed$i;
4926
4924
  index = i + start;
4927
- parsed[i] = (_parsed$i = {}, _defineProperty$1(_parsed$i, iAxis, singleScale || iScale.parse(labels[index], index)), _defineProperty$1(_parsed$i, vAxis, vScale.parse(data[index], index)), _parsed$i);
4925
+ parsed[i] = _defineProperty$1(_defineProperty$1({}, iAxis, singleScale || iScale.parse(labels[index], index)), vAxis, vScale.parse(data[index], index));
4928
4926
  }
4929
4927
  return parsed;
4930
4928
  }
@@ -9276,6 +9274,13 @@
9276
9274
  case 'right':
9277
9275
  left -= width;
9278
9276
  break;
9277
+ case 'inner':
9278
+ if (i === ilen - 1) {
9279
+ left -= width;
9280
+ } else if (i > 0) {
9281
+ left -= width / 2;
9282
+ }
9283
+ break;
9279
9284
  }
9280
9285
  backdrop = {
9281
9286
  left: left,
@@ -10433,9 +10438,9 @@
10433
10438
  return cached;
10434
10439
  }
10435
10440
  var hasFunction = function hasFunction(value) {
10436
- return isObject(value) && Object.getOwnPropertyNames(value).reduce(function (acc, key) {
10437
- return acc || isFunction(value[key]);
10438
- }, false);
10441
+ return isObject(value) && Object.getOwnPropertyNames(value).some(function (key) {
10442
+ return isFunction(value[key]);
10443
+ });
10439
10444
  };
10440
10445
  function needContext(proxy, names) {
10441
10446
  var _descriptors2 = _descriptors(proxy),
@@ -10460,7 +10465,7 @@
10460
10465
  }
10461
10466
  return false;
10462
10467
  }
10463
- var version = "4.4.0";
10468
+ var version = "4.4.1";
10464
10469
  var KNOWN_POSITIONS = ['top', 'bottom', 'left', 'right', 'chartArea'];
10465
10470
  function positionIsHorizontal(position, axis) {
10466
10471
  return position === 'top' || position === 'bottom' || KNOWN_POSITIONS.indexOf(position) === -1 && axis === 'x';
@@ -15285,12 +15290,15 @@
15285
15290
  }, {
15286
15291
  key: "_getActiveElements",
15287
15292
  value: function _getActiveElements(e, lastActive, replay, inChartArea) {
15293
+ var _this35 = this;
15288
15294
  var options = this.options;
15289
15295
  if (e.type === 'mouseout') {
15290
15296
  return [];
15291
15297
  }
15292
15298
  if (!inChartArea) {
15293
- return lastActive;
15299
+ return lastActive.filter(function (i) {
15300
+ return _this35.chart.data.datasets[i.datasetIndex] && _this35.chart.getDatasetMeta(i.datasetIndex).controller.getParsed(i.index) !== undefined;
15301
+ });
15294
15302
  }
15295
15303
  var active = this.chart.getElementsAtEventForMode(e, options.mode, options, replay);
15296
15304
  if (options.reverse) {
@@ -15477,13 +15485,13 @@
15477
15485
  _inherits$1(CategoryScale, _Scale);
15478
15486
  var _super19 = _createSuper$1(CategoryScale);
15479
15487
  function CategoryScale(cfg) {
15480
- var _this35;
15488
+ var _this36;
15481
15489
  _classCallCheck$1(this, CategoryScale);
15482
- _this35 = _super19.call(this, cfg);
15483
- _this35._startValue = undefined;
15484
- _this35._valueRange = 0;
15485
- _this35._addedLabels = [];
15486
- return _this35;
15490
+ _this36 = _super19.call(this, cfg);
15491
+ _this36._startValue = undefined;
15492
+ _this36._valueRange = 0;
15493
+ _this36._addedLabels = [];
15494
+ return _this36;
15487
15495
  }
15488
15496
  _createClass$1(CategoryScale, [{
15489
15497
  key: "init",
@@ -15726,15 +15734,15 @@
15726
15734
  _inherits$1(LinearScaleBase, _Scale2);
15727
15735
  var _super20 = _createSuper$1(LinearScaleBase);
15728
15736
  function LinearScaleBase(cfg) {
15729
- var _this36;
15737
+ var _this37;
15730
15738
  _classCallCheck$1(this, LinearScaleBase);
15731
- _this36 = _super20.call(this, cfg);
15732
- _this36.start = undefined;
15733
- _this36.end = undefined;
15734
- _this36._startValue = undefined;
15735
- _this36._endValue = undefined;
15736
- _this36._valueRange = 0;
15737
- return _this36;
15739
+ _this37 = _super20.call(this, cfg);
15740
+ _this37.start = undefined;
15741
+ _this37.end = undefined;
15742
+ _this37._startValue = undefined;
15743
+ _this37._endValue = undefined;
15744
+ _this37._valueRange = 0;
15745
+ return _this37;
15738
15746
  }
15739
15747
  _createClass$1(LinearScaleBase, [{
15740
15748
  key: "parse",
@@ -15984,14 +15992,14 @@
15984
15992
  _inherits$1(LogarithmicScale, _Scale3);
15985
15993
  var _super22 = _createSuper$1(LogarithmicScale);
15986
15994
  function LogarithmicScale(cfg) {
15987
- var _this37;
15995
+ var _this38;
15988
15996
  _classCallCheck$1(this, LogarithmicScale);
15989
- _this37 = _super22.call(this, cfg);
15990
- _this37.start = undefined;
15991
- _this37.end = undefined;
15992
- _this37._startValue = undefined;
15993
- _this37._valueRange = 0;
15994
- return _this37;
15997
+ _this38 = _super22.call(this, cfg);
15998
+ _this38.start = undefined;
15999
+ _this38.end = undefined;
16000
+ _this38._startValue = undefined;
16001
+ _this38._valueRange = 0;
16002
+ return _this38;
15995
16003
  }
15996
16004
  _createClass$1(LogarithmicScale, [{
15997
16005
  key: "parse",
@@ -16386,15 +16394,15 @@
16386
16394
  _inherits$1(RadialLinearScale, _LinearScaleBase2);
16387
16395
  var _super23 = _createSuper$1(RadialLinearScale);
16388
16396
  function RadialLinearScale(cfg) {
16389
- var _this38;
16397
+ var _this39;
16390
16398
  _classCallCheck$1(this, RadialLinearScale);
16391
- _this38 = _super23.call(this, cfg);
16392
- _this38.xCenter = undefined;
16393
- _this38.yCenter = undefined;
16394
- _this38.drawingArea = undefined;
16395
- _this38._pointLabels = [];
16396
- _this38._pointLabelItems = [];
16397
- return _this38;
16399
+ _this39 = _super23.call(this, cfg);
16400
+ _this39.xCenter = undefined;
16401
+ _this39.yCenter = undefined;
16402
+ _this39.drawingArea = undefined;
16403
+ _this39._pointLabels = [];
16404
+ _this39._pointLabelItems = [];
16405
+ return _this39;
16398
16406
  }
16399
16407
  _createClass$1(RadialLinearScale, [{
16400
16408
  key: "setDimensions",
@@ -16424,13 +16432,13 @@
16424
16432
  }, {
16425
16433
  key: "generateTickLabels",
16426
16434
  value: function generateTickLabels(ticks) {
16427
- var _this39 = this;
16435
+ var _this40 = this;
16428
16436
  LinearScaleBase.prototype.generateTickLabels.call(this, ticks);
16429
16437
  this._pointLabels = this.getLabels().map(function (value, index) {
16430
- var label = callback(_this39.options.pointLabels.callback, [value, index], _this39);
16438
+ var label = callback(_this40.options.pointLabels.callback, [value, index], _this40);
16431
16439
  return label || label === 0 ? label : '';
16432
16440
  }).filter(function (v, i) {
16433
- return _this39.chart.getDataVisibility(i);
16441
+ return _this40.chart.getDataVisibility(i);
16434
16442
  });
16435
16443
  }
16436
16444
  }, {
@@ -16543,7 +16551,7 @@
16543
16551
  }, {
16544
16552
  key: "drawGrid",
16545
16553
  value: function drawGrid() {
16546
- var _this40 = this;
16554
+ var _this41 = this;
16547
16555
  var ctx = this.ctx;
16548
16556
  var opts = this.options;
16549
16557
  var angleLines = opts.angleLines,
@@ -16557,11 +16565,11 @@
16557
16565
  if (grid.display) {
16558
16566
  this.ticks.forEach(function (tick, index) {
16559
16567
  if (index !== 0) {
16560
- offset = _this40.getDistanceFromCenterForValue(tick.value);
16561
- var context = _this40.getContext(index);
16568
+ offset = _this41.getDistanceFromCenterForValue(tick.value);
16569
+ var context = _this41.getContext(index);
16562
16570
  var optsAtIndex = grid.setContext(context);
16563
16571
  var optsAtIndexBorder = border.setContext(context);
16564
- drawRadiusLine(_this40, optsAtIndex, offset, labelCount, optsAtIndexBorder);
16572
+ drawRadiusLine(_this41, optsAtIndex, offset, labelCount, optsAtIndexBorder);
16565
16573
  }
16566
16574
  });
16567
16575
  }
@@ -16594,7 +16602,7 @@
16594
16602
  }, {
16595
16603
  key: "drawLabels",
16596
16604
  value: function drawLabels() {
16597
- var _this41 = this;
16605
+ var _this42 = this;
16598
16606
  var ctx = this.ctx;
16599
16607
  var opts = this.options;
16600
16608
  var tickOpts = opts.ticks;
@@ -16612,9 +16620,9 @@
16612
16620
  if (index === 0 && !opts.reverse) {
16613
16621
  return;
16614
16622
  }
16615
- var optsAtIndex = tickOpts.setContext(_this41.getContext(index));
16623
+ var optsAtIndex = tickOpts.setContext(_this42.getContext(index));
16616
16624
  var tickFont = toFont(optsAtIndex.font);
16617
- offset = _this41.getDistanceFromCenterForValue(_this41.ticks[index].value);
16625
+ offset = _this42.getDistanceFromCenterForValue(_this42.ticks[index].value);
16618
16626
  if (optsAtIndex.showLabelBackdrop) {
16619
16627
  ctx.font = tickFont.string;
16620
16628
  width = ctx.measureText(tick.label).width;
@@ -16823,20 +16831,20 @@
16823
16831
  _inherits$1(TimeScale, _Scale4);
16824
16832
  var _super24 = _createSuper$1(TimeScale);
16825
16833
  function TimeScale(props) {
16826
- var _this42;
16834
+ var _this43;
16827
16835
  _classCallCheck$1(this, TimeScale);
16828
- _this42 = _super24.call(this, props);
16829
- _this42._cache = {
16836
+ _this43 = _super24.call(this, props);
16837
+ _this43._cache = {
16830
16838
  data: [],
16831
16839
  labels: [],
16832
16840
  all: []
16833
16841
  };
16834
- _this42._unit = 'day';
16835
- _this42._majorUnit = undefined;
16836
- _this42._offsets = {};
16837
- _this42._normalized = false;
16838
- _this42._parseOpts = undefined;
16839
- return _this42;
16842
+ _this43._unit = 'day';
16843
+ _this43._majorUnit = undefined;
16844
+ _this43._offsets = {};
16845
+ _this43._normalized = false;
16846
+ _this43._parseOpts = undefined;
16847
+ return _this43;
16840
16848
  }
16841
16849
  _createClass$1(TimeScale, [{
16842
16850
  key: "init",
@@ -17195,13 +17203,13 @@
17195
17203
  _inherits$1(TimeSeriesScale, _TimeScale);
17196
17204
  var _super25 = _createSuper$1(TimeSeriesScale);
17197
17205
  function TimeSeriesScale(props) {
17198
- var _this43;
17206
+ var _this44;
17199
17207
  _classCallCheck$1(this, TimeSeriesScale);
17200
- _this43 = _super25.call(this, props);
17201
- _this43._table = [];
17202
- _this43._minPos = undefined;
17203
- _this43._tableRange = undefined;
17204
- return _this43;
17208
+ _this44 = _super25.call(this, props);
17209
+ _this44._table = [];
17210
+ _this44._minPos = undefined;
17211
+ _this44._tableRange = undefined;
17212
+ return _this44;
17205
17213
  }
17206
17214
  _createClass$1(TimeSeriesScale, [{
17207
17215
  key: "initOffsets",
@@ -17436,14 +17444,14 @@
17436
17444
  valueOrDefault: valueOrDefault
17437
17445
  });
17438
17446
 
17439
- function _typeof(obj) {
17447
+ function _typeof(o) {
17440
17448
  "@babel/helpers - typeof";
17441
17449
 
17442
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
17443
- return typeof obj;
17444
- } : function (obj) {
17445
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
17446
- }, _typeof(obj);
17450
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
17451
+ return typeof o;
17452
+ } : function (o) {
17453
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
17454
+ }, _typeof(o);
17447
17455
  }
17448
17456
 
17449
17457
  function toInteger(dirtyNumber) {
@@ -18254,7 +18262,6 @@
18254
18262
  return value < 0 ? Math.ceil(value) : Math.floor(value);
18255
18263
  } // Math.trunc is not supported by IE
18256
18264
  };
18257
-
18258
18265
  var defaultRoundingMethod = 'trunc';
18259
18266
  function getRoundingMethod(method) {
18260
18267
  return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];
@@ -21275,7 +21282,6 @@
21275
21282
  // 0 to 999, -0 to -999
21276
21283
  fourDigitsSigned: /^-?\d{1,4}/ // 0 to 9999, -0 to -9999
21277
21284
  };
21278
-
21279
21285
  var timezonePatterns = {
21280
21286
  basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
21281
21287
  basic: /^([+-])(\d{2})(\d{2})|Z/,
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.4
4
+ version: 5.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-27 00:00:00.000000000 Z
11
+ date: 2023-12-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: andrew@ankane.org