]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Revert fix for monotone cubic interpolation (#11432)
authorstockiNail <stocki.nail@gmail.com>
Wed, 2 Aug 2023 14:42:29 +0000 (16:42 +0200)
committerGitHub <noreply@github.com>
Wed, 2 Aug 2023 14:42:29 +0000 (10:42 -0400)
src/controllers/controller.line.js
test/fixtures/controller.line/cubicInterpolationMode/scaleMInMaxLimits.js [deleted file]
test/fixtures/controller.line/cubicInterpolationMode/scaleMInMaxLimits.png [deleted file]
test/fixtures/controller.line/cubicInterpolationMode/scaleMaxLimit.js [deleted file]
test/fixtures/controller.line/cubicInterpolationMode/scaleMaxLimit.png [deleted file]

index 8c5977e19579527079d3c4ed479d9f6a5dd0623b..fddd5ce9889c6b0b21947623f4ea670a09c8592e 100644 (file)
@@ -57,7 +57,7 @@ export default class LineController extends DatasetController {
     line._chart = this.chart;
     line._datasetIndex = this.index;
     line._decimated = !!_dataset._decimated;
-    line.points = points.slice(Math.max(this._drawStart - 1, 0), this._drawStart + this._drawCount);
+    line.points = points;
 
     const options = this.resolveDatasetElementOptions(mode);
     if (!this.options.showLine) {
diff --git a/test/fixtures/controller.line/cubicInterpolationMode/scaleMInMaxLimits.js b/test/fixtures/controller.line/cubicInterpolationMode/scaleMInMaxLimits.js
deleted file mode 100644 (file)
index 605ac18..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-module.exports = {
-  config: {
-    type: 'line',
-    data: {
-      datasets: [
-        {
-          data: [
-            {x: -10, y: 150},
-            {x: 0, y: 81},
-            {x: 10, y: 49},
-            {x: 20, y: 32},
-            {x: 30, y: 21},
-            {x: 35, y: 1},
-            {x: 40, y: 16},
-            {x: 45, y: 13},
-          ],
-          borderColor: '#ff0000',
-          cubicInterpolationMode: 'monotone'
-        }
-      ]
-    },
-    options: {
-      scales: {
-        x: {display: false, type: 'linear', min: 5, max: 37},
-        y: {display: false}
-      }
-    }
-  },
-  options: {
-    canvas: {
-      height: 256,
-      width: 512
-    }
-  }
-};
diff --git a/test/fixtures/controller.line/cubicInterpolationMode/scaleMInMaxLimits.png b/test/fixtures/controller.line/cubicInterpolationMode/scaleMInMaxLimits.png
deleted file mode 100644 (file)
index 056d451..0000000
Binary files a/test/fixtures/controller.line/cubicInterpolationMode/scaleMInMaxLimits.png and /dev/null differ
diff --git a/test/fixtures/controller.line/cubicInterpolationMode/scaleMaxLimit.js b/test/fixtures/controller.line/cubicInterpolationMode/scaleMaxLimit.js
deleted file mode 100644 (file)
index 6bae22d..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-module.exports = {
-  config: {
-    type: 'line',
-    data: {
-      datasets: [
-        {
-          data: [
-            {x: -10, y: 150},
-            {x: 0, y: 81},
-            {x: 10, y: 49},
-            {x: 20, y: 32},
-            {x: 30, y: 21},
-            {x: 35, y: 1},
-            {x: 40, y: 16},
-            {x: 45, y: 13},
-          ],
-          borderColor: '#ff0000',
-          cubicInterpolationMode: 'monotone'
-        }
-      ]
-    },
-    options: {
-      scales: {
-        x: {display: false, type: 'linear', max: 30},
-        y: {display: false}
-      }
-    }
-  },
-  options: {
-    canvas: {
-      height: 256,
-      width: 512
-    }
-  }
-};
diff --git a/test/fixtures/controller.line/cubicInterpolationMode/scaleMaxLimit.png b/test/fixtures/controller.line/cubicInterpolationMode/scaleMaxLimit.png
deleted file mode 100644 (file)
index 048c8c3..0000000
Binary files a/test/fixtures/controller.line/cubicInterpolationMode/scaleMaxLimit.png and /dev/null differ