chartkick 5.1.0 → 5.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/lib/chartkick/engine.rb +1 -1
- data/lib/chartkick/version.rb +1 -1
- data/vendor/assets/javascripts/Chart.bundle.js +18 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c02c167e89a1d4b519eef7efd26bba1cdd94454058d5c1c172263cd338c854da
|
4
|
+
data.tar.gz: 54537bba9415ee70f1f0b081c5614348c37a75f3220aa114061486b6ee170dda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6109c2e24f9dc17e48769d88da714c38e463c49379af85361d4c560e79369208e4b03282ed41be7aab0bc3fd5af29d15ea9af697caf347d8c8b9b76afeb50b1
|
7
|
+
data.tar.gz: daca8c4bb5c24e889a9feaa542d2088ec8b62b41658179bbbc4ad6afe67e7eecc3e9d956e7dc560596b3c2cae10a286b5304929debfa0db35c6acd0b7ef09dd9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 5.1.2 (2024-10-29)
|
2
|
+
|
3
|
+
- Updated Chart.js to 4.4.6
|
4
|
+
|
5
|
+
## 5.1.1 (2024-10-16)
|
6
|
+
|
7
|
+
- Updated Chart.js to 4.4.5
|
8
|
+
|
1
9
|
## 5.1.0 (2024-08-20)
|
2
10
|
|
3
11
|
- Updated Chart.js to 4.4.4
|
@@ -375,3 +383,15 @@ Breaking changes
|
|
375
383
|
## 0.0.4 (2013-05-13)
|
376
384
|
|
377
385
|
- Fix for `Uncaught ReferenceError: Chartkick is not defined` when chartkick.js is included in the `<head>`
|
386
|
+
|
387
|
+
## 0.0.3 (2013-05-12)
|
388
|
+
|
389
|
+
- Improved error messages
|
390
|
+
|
391
|
+
## 0.0.2 (2013-05-10)
|
392
|
+
|
393
|
+
- Added `min` and `max` options
|
394
|
+
|
395
|
+
## 0.0.1 (2013-05-07)
|
396
|
+
|
397
|
+
- First release
|
data/lib/chartkick/engine.rb
CHANGED
@@ -4,7 +4,7 @@ module Chartkick
|
|
4
4
|
|
5
5
|
# for importmap
|
6
6
|
initializer "chartkick.importmap" do |app|
|
7
|
-
if defined?(Importmap)
|
7
|
+
if app.config.respond_to?(:assets) && defined?(Importmap) && defined?(Sprockets)
|
8
8
|
app.config.assets.precompile << "chartkick.js"
|
9
9
|
app.config.assets.precompile << "Chart.bundle.js"
|
10
10
|
end
|
data/lib/chartkick/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Chart.js v4.4.
|
2
|
+
* Chart.js v4.4.6
|
3
3
|
* https://www.chartjs.org
|
4
4
|
* (c) 2024 Chart.js Contributors
|
5
5
|
* Released under the MIT License
|
@@ -222,10 +222,10 @@
|
|
222
222
|
for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf$1(t)););
|
223
223
|
return t;
|
224
224
|
}
|
225
|
-
function _superPropGet(t, e,
|
226
|
-
var p = _get(_getPrototypeOf$1(1 &
|
227
|
-
return 2 &
|
228
|
-
return p.apply(
|
225
|
+
function _superPropGet(t, e, o, r) {
|
226
|
+
var p = _get(_getPrototypeOf$1(1 & r ? t.prototype : t), e, o);
|
227
|
+
return 2 & r && "function" == typeof p ? function (t) {
|
228
|
+
return p.apply(o, t);
|
229
229
|
} : p;
|
230
230
|
}
|
231
231
|
function _toConsumableArray(r) {
|
@@ -4496,9 +4496,11 @@
|
|
4496
4496
|
if (value === null) {
|
4497
4497
|
return;
|
4498
4498
|
}
|
4499
|
+
var found = false;
|
4499
4500
|
for (i = 0, ilen = keys.length; i < ilen; ++i) {
|
4500
4501
|
datasetIndex = +keys[i];
|
4501
4502
|
if (datasetIndex === dsIndex) {
|
4503
|
+
found = true;
|
4502
4504
|
if (options.all) {
|
4503
4505
|
continue;
|
4504
4506
|
}
|
@@ -4509,6 +4511,9 @@
|
|
4509
4511
|
value += otherValue;
|
4510
4512
|
}
|
4511
4513
|
}
|
4514
|
+
if (!found && !options.all) {
|
4515
|
+
return 0;
|
4516
|
+
}
|
4512
4517
|
return value;
|
4513
4518
|
}
|
4514
4519
|
function convertObjectDataToArray(data, meta) {
|
@@ -4808,6 +4813,7 @@
|
|
4808
4813
|
this._resyncElements(resetNewElements);
|
4809
4814
|
if (stackChanged || oldStacked !== meta._stacked) {
|
4810
4815
|
updateStacks(this, meta._parsed);
|
4816
|
+
meta._stacked = isStacked(meta.vScale, meta);
|
4811
4817
|
}
|
4812
4818
|
}
|
4813
4819
|
}, {
|
@@ -10396,7 +10402,7 @@
|
|
10396
10402
|
}
|
10397
10403
|
return false;
|
10398
10404
|
}
|
10399
|
-
var version = "4.4.
|
10405
|
+
var version = "4.4.6";
|
10400
10406
|
var KNOWN_POSITIONS = ['top', 'bottom', 'left', 'right', 'chartArea'];
|
10401
10407
|
function positionIsHorizontal(position, axis) {
|
10402
10408
|
return position === 'top' || position === 'bottom' || KNOWN_POSITIONS.indexOf(position) === -1 && axis === 'x';
|
@@ -12550,6 +12556,9 @@
|
|
12550
12556
|
function containsColorsDefinition(descriptor) {
|
12551
12557
|
return descriptor && (descriptor.borderColor || descriptor.backgroundColor);
|
12552
12558
|
}
|
12559
|
+
function containsDefaultColorsDefenitions() {
|
12560
|
+
return defaults.borderColor !== 'rgba(0,0,0,0.1)' || defaults.backgroundColor !== 'rgba(0,0,0,0.1)';
|
12561
|
+
}
|
12553
12562
|
var plugin_colors = {
|
12554
12563
|
id: 'colors',
|
12555
12564
|
defaults: {
|
@@ -12564,7 +12573,8 @@
|
|
12564
12573
|
datasets = _chart$config.data.datasets,
|
12565
12574
|
chartOptions = _chart$config.options;
|
12566
12575
|
var elements = chartOptions.elements;
|
12567
|
-
|
12576
|
+
var containsColorDefenition = containsColorsDefinitions(datasets) || containsColorsDefinition(chartOptions) || elements && containsColorsDefinitions(elements) || containsDefaultColorsDefenitions();
|
12577
|
+
if (!options.forceOverride && containsColorDefenition) {
|
12568
12578
|
return;
|
12569
12579
|
}
|
12570
12580
|
var colorizer = getColorizer(chart);
|
@@ -16289,7 +16299,7 @@
|
|
16289
16299
|
ctx.save();
|
16290
16300
|
ctx.strokeStyle = color;
|
16291
16301
|
ctx.lineWidth = lineWidth;
|
16292
|
-
ctx.setLineDash(borderOpts.dash);
|
16302
|
+
ctx.setLineDash(borderOpts.dash || []);
|
16293
16303
|
ctx.lineDashOffset = borderOpts.dashOffset;
|
16294
16304
|
ctx.beginPath();
|
16295
16305
|
pathRadiusLine(scale, radius, circular, labelCount);
|
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.1.
|
4
|
+
version: 5.1.2
|
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-
|
11
|
+
date: 2024-10-30 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.
|
55
|
+
rubygems_version: 3.5.16
|
56
56
|
signing_key:
|
57
57
|
specification_version: 4
|
58
58
|
summary: Create beautiful JavaScript charts with one line of Ruby
|