chartkick 5.0.3 → 5.0.4

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: 64aeef8738559b3bc68cd4fdcb6b0c35d6d422f9c546682604a3629cdb336c1a
4
- data.tar.gz: 25fbeaa2c09039fa0d37b358c7abaaa62dd7327a784cea81cdd7b2904371b711
3
+ metadata.gz: 63023f3430e85adec8b4f0082ccf11ff8ce7033c7cdbb85183e444860d432bed
4
+ data.tar.gz: a8363b343ef5a03d016b02f1e0daeb0f7a4d020dd1fea83e02d5d137726f6c91
5
5
  SHA512:
6
- metadata.gz: ee29227239ea30e2af8dcc19387c3191a2fc543f662c6541589e469e86c4717748ad996b68383fdc42c29d3db72b1493279da909e22ee6e950e936a4e50e21b5
7
- data.tar.gz: 6537e0a58427e8ef48564b3c1369597776bc46619d18cf5bad8a40f19d035e1e3206c46447ea553f22fe975ecc5904bf209a6f2f3f15c6ea38bec4cd84a15c66
6
+ metadata.gz: 7aea2637834ab508858d53f3e0802a72d437adc41715adc00fdda62b207ac46838256e93ec1f6c105de186d13ed88210d881dd95fdf6cbbb35ed58fe3d98d58d
7
+ data.tar.gz: 83f8bad0d4a81b6540315230c900c31882b03fabb462f2d2b8e1e8750ffbee12626e01f5606ae50caa2768d8007a528556eab6944ba5899a55156892ff2e7900
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 5.0.4 (2023-08-27)
2
+
3
+ - Updated Chart.js to 4.4.0
4
+
1
5
  ## 5.0.3 (2023-07-24)
2
6
 
3
7
  - Updated Chart.js to 4.3.1
@@ -1,3 +1,3 @@
1
1
  module Chartkick
2
- VERSION = "5.0.3"
2
+ VERSION = "5.0.4"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chart.js v4.3.1
2
+ * Chart.js v4.4.0
3
3
  * https://www.chartjs.org
4
4
  * (c) 2023 Chart.js Contributors
5
5
  * Released under the MIT License
@@ -2027,6 +2027,7 @@
2027
2027
  reverse: false,
2028
2028
  beginAtZero: false,
2029
2029
  bounds: 'ticks',
2030
+ clip: true,
2030
2031
  grace: 0,
2031
2032
  grid: {
2032
2033
  display: true,
@@ -2609,7 +2610,7 @@
2609
2610
  h = rect.h,
2610
2611
  radius = rect.radius;
2611
2612
  // top left arc
2612
- ctx.arc(x + radius.topLeft, y + radius.topLeft, radius.topLeft, -HALF_PI, PI, true);
2613
+ ctx.arc(x + radius.topLeft, y + radius.topLeft, radius.topLeft, 1.5 * PI, PI, true);
2613
2614
  // line from top left to bottom left
2614
2615
  ctx.lineTo(x, y + h - radius.bottomLeft);
2615
2616
  // bottom left arc
@@ -6476,7 +6477,7 @@
6476
6477
  line._chart = this.chart;
6477
6478
  line._datasetIndex = this.index;
6478
6479
  line._decimated = !!_dataset._decimated;
6479
- line.points = points.slice(Math.max(this._drawStart - 1, 0), this._drawStart + this._drawCount);
6480
+ line.points = points;
6480
6481
  var options = this.resolveDatasetElementOptions(mode);
6481
6482
  if (!this.options.showLine) {
6482
6483
  options.borderWidth = 0;
@@ -10459,7 +10460,7 @@
10459
10460
  }
10460
10461
  return false;
10461
10462
  }
10462
- var version = "4.3.1";
10463
+ var version = "4.4.0";
10463
10464
  var KNOWN_POSITIONS = ['top', 'bottom', 'left', 'right', 'chartArea'];
10464
10465
  function positionIsHorizontal(position, axis) {
10465
10466
  return position === 'top' || position === 'bottom' || KNOWN_POSITIONS.indexOf(position) === -1 && axis === 'x';
@@ -10521,17 +10522,21 @@
10521
10522
  }
10522
10523
  return e;
10523
10524
  }
10524
- function getDatasetArea(meta) {
10525
+ function getSizeForArea(scale, chartArea, field) {
10526
+ return scale.options.clip ? scale[field] : chartArea[field];
10527
+ }
10528
+ function getDatasetArea(meta, chartArea) {
10525
10529
  var xScale = meta.xScale,
10526
10530
  yScale = meta.yScale;
10527
10531
  if (xScale && yScale) {
10528
10532
  return {
10529
- left: xScale.left,
10530
- right: xScale.right,
10531
- top: yScale.top,
10532
- bottom: yScale.bottom
10533
+ left: getSizeForArea(xScale, chartArea, 'left'),
10534
+ right: getSizeForArea(xScale, chartArea, 'right'),
10535
+ top: getSizeForArea(yScale, chartArea, 'top'),
10536
+ bottom: getSizeForArea(yScale, chartArea, 'bottom')
10533
10537
  };
10534
10538
  }
10539
+ return chartArea;
10535
10540
  }
10536
10541
  var Chart = /*#__PURE__*/function () {
10537
10542
  function Chart(item, userConfig) {
@@ -11124,7 +11129,7 @@
11124
11129
  var ctx = this.ctx;
11125
11130
  var clip = meta._clip;
11126
11131
  var useClip = !clip.disabled;
11127
- var area = getDatasetArea(meta) || this.chartArea;
11132
+ var area = getDatasetArea(meta, this.chartArea);
11128
11133
  var args = {
11129
11134
  meta: meta,
11130
11135
  index: meta.index,
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.3
4
+ version: 5.0.4
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-07-24 00:00:00.000000000 Z
11
+ date: 2023-08-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: andrew@ankane.org