From: Sebastian Niemann <5516578+sebiniemann@users.noreply.github.com> Date: Fri, 12 Jun 2020 22:03:52 +0000 (+0200) Subject: Turns off interpolation per default (#7386) X-Git-Tag: v3.0.0-beta.2~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b628c33b2bdb891d367447212e92076aa01226c;p=thirdparty%2FChart.js.git Turns off interpolation per default (#7386) Co-authored-by: Sebastian Niemann --- diff --git a/docs/docs/charts/line.mdx b/docs/docs/charts/line.mdx index eac6ace0f..19279229a 100644 --- a/docs/docs/charts/line.mdx +++ b/docs/docs/charts/line.mdx @@ -72,7 +72,7 @@ The line chart allows a number of properties to be specified for each dataset. T | [`hoverBorderJoinStyle`](#line-styling) | `string` | Yes | - | `undefined` | [`hoverBorderWidth`](#line-styling) | `number` | Yes | - | `undefined` | [`label`](#general) | `string` | - | - | `''` -| [`lineTension`](#line-styling) | `number` | - | - | `0.4` +| [`lineTension`](#line-styling) | `number` | - | - | `0` | [`order`](#general) | `number` | - | - | `0` | [`pointBackgroundColor`](#point-styling) | `Color` | Yes | Yes | `'rgba(0, 0, 0, 0.1)'` | [`pointBorderColor`](#point-styling) | `Color` | Yes | Yes | `'rgba(0, 0, 0, 0.1)'` diff --git a/package-lock.json b/package-lock.json index d7e855725..6ca9da985 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1400,6 +1400,127 @@ "@babel/types": "^7.7.0", "eslint-visitor-keys": "^1.0.0", "resolve": "^1.12.0" + }, + "dependencies": { + "@babel/generator": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.6.tgz", + "integrity": "sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ==", + "dev": true, + "requires": { + "@babel/types": "^7.9.6", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz", + "integrity": "sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.9.5" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.6.tgz", + "integrity": "sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q==", + "dev": true + }, + "@babel/template": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", + "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.8.3" + } + } + } + }, + "@babel/traverse": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.6.tgz", + "integrity": "sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.9.6", + "@babel/helper-function-name": "^7.9.5", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.9.6", + "@babel/types": "^7.9.6", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.8.3" + } + } + } + }, + "@babel/types": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz", + "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.5", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "babel-helper-call-delegate": { diff --git a/src/elements/element.line.js b/src/elements/element.line.js index 9e45e22d5..c29cb5519 100644 --- a/src/elements/element.line.js +++ b/src/elements/element.line.js @@ -18,7 +18,7 @@ defaults.set(scope, { borderWidth: 3, capBezierPoints: true, fill: true, - tension: 0.4 + tension: 0 }); defaults.route(scope, ['backgroundColor', 'borderColor'], '', 'color'); diff --git a/test/fixtures/controller.line/backgroundColor/scriptable.png b/test/fixtures/controller.line/backgroundColor/scriptable.png index 00f11aa55..81831ec6c 100644 Binary files a/test/fixtures/controller.line/backgroundColor/scriptable.png and b/test/fixtures/controller.line/backgroundColor/scriptable.png differ diff --git a/test/fixtures/controller.line/backgroundColor/value.png b/test/fixtures/controller.line/backgroundColor/value.png index 4e31ae42b..3f303d024 100644 Binary files a/test/fixtures/controller.line/backgroundColor/value.png and b/test/fixtures/controller.line/backgroundColor/value.png differ diff --git a/test/fixtures/controller.line/borderColor/scriptable.png b/test/fixtures/controller.line/borderColor/scriptable.png index 5df5acb7f..02a9ea274 100644 Binary files a/test/fixtures/controller.line/borderColor/scriptable.png and b/test/fixtures/controller.line/borderColor/scriptable.png differ diff --git a/test/fixtures/controller.line/borderColor/value.png b/test/fixtures/controller.line/borderColor/value.png index 53a2dafb0..a58074563 100644 Binary files a/test/fixtures/controller.line/borderColor/value.png and b/test/fixtures/controller.line/borderColor/value.png differ diff --git a/test/fixtures/controller.line/borderDash/scriptable.png b/test/fixtures/controller.line/borderDash/scriptable.png index aca33c7d2..fab773b82 100644 Binary files a/test/fixtures/controller.line/borderDash/scriptable.png and b/test/fixtures/controller.line/borderDash/scriptable.png differ diff --git a/test/fixtures/controller.line/borderDash/value.png b/test/fixtures/controller.line/borderDash/value.png index 0704b19bf..8a68ce751 100644 Binary files a/test/fixtures/controller.line/borderDash/value.png and b/test/fixtures/controller.line/borderDash/value.png differ diff --git a/test/fixtures/controller.line/borderWidth/scriptable.png b/test/fixtures/controller.line/borderWidth/scriptable.png index ab54b5a99..2e77d049e 100644 Binary files a/test/fixtures/controller.line/borderWidth/scriptable.png and b/test/fixtures/controller.line/borderWidth/scriptable.png differ diff --git a/test/fixtures/controller.line/borderWidth/value.png b/test/fixtures/controller.line/borderWidth/value.png index 715ea7200..6c18e4999 100644 Binary files a/test/fixtures/controller.line/borderWidth/value.png and b/test/fixtures/controller.line/borderWidth/value.png differ diff --git a/test/fixtures/controller.line/clip/default-x-max.png b/test/fixtures/controller.line/clip/default-x-max.png index 1b1ff84f8..d5010ad17 100644 Binary files a/test/fixtures/controller.line/clip/default-x-max.png and b/test/fixtures/controller.line/clip/default-x-max.png differ diff --git a/test/fixtures/controller.line/clip/default-x-min.png b/test/fixtures/controller.line/clip/default-x-min.png index 44dce35d7..7f406b11e 100644 Binary files a/test/fixtures/controller.line/clip/default-x-min.png and b/test/fixtures/controller.line/clip/default-x-min.png differ diff --git a/test/fixtures/controller.line/clip/default-x.png b/test/fixtures/controller.line/clip/default-x.png index f6601de69..a409d1979 100644 Binary files a/test/fixtures/controller.line/clip/default-x.png and b/test/fixtures/controller.line/clip/default-x.png differ diff --git a/test/fixtures/controller.line/clip/default-y-max.png b/test/fixtures/controller.line/clip/default-y-max.png index 33473b8af..be188dec9 100644 Binary files a/test/fixtures/controller.line/clip/default-y-max.png and b/test/fixtures/controller.line/clip/default-y-max.png differ diff --git a/test/fixtures/controller.line/clip/default-y-min.png b/test/fixtures/controller.line/clip/default-y-min.png index 7ae2e6510..356eff3b0 100644 Binary files a/test/fixtures/controller.line/clip/default-y-min.png and b/test/fixtures/controller.line/clip/default-y-min.png differ diff --git a/test/fixtures/controller.line/clip/default-y.png b/test/fixtures/controller.line/clip/default-y.png index 7878ab657..2def4c523 100644 Binary files a/test/fixtures/controller.line/clip/default-y.png and b/test/fixtures/controller.line/clip/default-y.png differ diff --git a/test/fixtures/controller.line/clip/specified.png b/test/fixtures/controller.line/clip/specified.png index 60e60b234..6aa531c97 100644 Binary files a/test/fixtures/controller.line/clip/specified.png and b/test/fixtures/controller.line/clip/specified.png differ diff --git a/test/fixtures/controller.line/cubicInterpolationMode/scriptable.js b/test/fixtures/controller.line/cubicInterpolationMode/scriptable.js index 39f8ed56f..d2dfd54b1 100644 --- a/test/fixtures/controller.line/cubicInterpolationMode/scriptable.js +++ b/test/fixtures/controller.line/cubicInterpolationMode/scriptable.js @@ -28,7 +28,8 @@ module.exports = { cubicInterpolationMode: function(ctx) { return ctx.datasetIndex === 0 ? 'monotone' : 'default'; }, - fill: false + fill: false, + tension: 0.4 } }, layout: { diff --git a/test/fixtures/controller.line/cubicInterpolationMode/value.js b/test/fixtures/controller.line/cubicInterpolationMode/value.js index 6183d4630..516eb9797 100644 --- a/test/fixtures/controller.line/cubicInterpolationMode/value.js +++ b/test/fixtures/controller.line/cubicInterpolationMode/value.js @@ -25,6 +25,7 @@ module.exports = { borderWidth: 20, cubicInterpolationMode: 'default', fill: false, + tension: 0.4 } }, layout: { diff --git a/test/fixtures/controller.line/fill/order-default.png b/test/fixtures/controller.line/fill/order-default.png index 6c07bd20b..958d591ab 100644 Binary files a/test/fixtures/controller.line/fill/order-default.png and b/test/fixtures/controller.line/fill/order-default.png differ diff --git a/test/fixtures/controller.line/fill/order.png b/test/fixtures/controller.line/fill/order.png index 6ff1a054f..6660cb8f2 100644 Binary files a/test/fixtures/controller.line/fill/order.png and b/test/fixtures/controller.line/fill/order.png differ diff --git a/test/fixtures/controller.line/fill/scriptable.png b/test/fixtures/controller.line/fill/scriptable.png index bd93389a6..8127ec409 100644 Binary files a/test/fixtures/controller.line/fill/scriptable.png and b/test/fixtures/controller.line/fill/scriptable.png differ diff --git a/test/fixtures/controller.line/fill/value.png b/test/fixtures/controller.line/fill/value.png index 4ec8a8311..6f0601c89 100644 Binary files a/test/fixtures/controller.line/fill/value.png and b/test/fixtures/controller.line/fill/value.png differ diff --git a/test/fixtures/controller.line/non-numeric-y.png b/test/fixtures/controller.line/non-numeric-y.png index 5ebecd597..856197ab7 100644 Binary files a/test/fixtures/controller.line/non-numeric-y.png and b/test/fixtures/controller.line/non-numeric-y.png differ diff --git a/test/fixtures/controller.line/stacking/order-default.png b/test/fixtures/controller.line/stacking/order-default.png index 3355da629..2e93a7bf9 100644 Binary files a/test/fixtures/controller.line/stacking/order-default.png and b/test/fixtures/controller.line/stacking/order-default.png differ diff --git a/test/fixtures/controller.line/stacking/order-specified.png b/test/fixtures/controller.line/stacking/order-specified.png index ff3edfaf1..b832bd9db 100644 Binary files a/test/fixtures/controller.line/stacking/order-specified.png and b/test/fixtures/controller.line/stacking/order-specified.png differ diff --git a/test/fixtures/core.layouts/long-labels.png b/test/fixtures/core.layouts/long-labels.png index fdb604526..49d1637ba 100644 Binary files a/test/fixtures/core.layouts/long-labels.png and b/test/fixtures/core.layouts/long-labels.png differ diff --git a/test/fixtures/element.line/default.png b/test/fixtures/element.line/default.png index b686f4d49..adf64009b 100644 Binary files a/test/fixtures/element.line/default.png and b/test/fixtures/element.line/default.png differ diff --git a/test/fixtures/element.line/tension/default.png b/test/fixtures/element.line/tension/default.png index d8aeba911..1b1515894 100644 Binary files a/test/fixtures/element.line/tension/default.png and b/test/fixtures/element.line/tension/default.png differ diff --git a/test/fixtures/plugin.filler/fill-line-boundary-origin-spline-above.png b/test/fixtures/plugin.filler/fill-line-boundary-origin-spline-above.png index c0b25469d..3b3caff73 100644 Binary files a/test/fixtures/plugin.filler/fill-line-boundary-origin-spline-above.png and b/test/fixtures/plugin.filler/fill-line-boundary-origin-spline-above.png differ diff --git a/test/fixtures/plugin.filler/fill-line-boundary-origin-spline-span.png b/test/fixtures/plugin.filler/fill-line-boundary-origin-spline-span.png index 75aef6a76..a93784a2a 100644 Binary files a/test/fixtures/plugin.filler/fill-line-boundary-origin-spline-span.png and b/test/fixtures/plugin.filler/fill-line-boundary-origin-spline-span.png differ diff --git a/test/fixtures/plugin.filler/fill-line-boundary-origin-spline.png b/test/fixtures/plugin.filler/fill-line-boundary-origin-spline.png index 3e22492e5..4d67822d5 100644 Binary files a/test/fixtures/plugin.filler/fill-line-boundary-origin-spline.png and b/test/fixtures/plugin.filler/fill-line-boundary-origin-spline.png differ diff --git a/test/fixtures/plugin.filler/fill-line-dataset-spline-span-above.png b/test/fixtures/plugin.filler/fill-line-dataset-spline-span-above.png index 838a24b5d..481493231 100644 Binary files a/test/fixtures/plugin.filler/fill-line-dataset-spline-span-above.png and b/test/fixtures/plugin.filler/fill-line-dataset-spline-span-above.png differ diff --git a/test/fixtures/plugin.filler/fill-line-dataset-spline-span-below.png b/test/fixtures/plugin.filler/fill-line-dataset-spline-span-below.png index 68a20e2ee..5eb6663b7 100644 Binary files a/test/fixtures/plugin.filler/fill-line-dataset-spline-span-below.png and b/test/fixtures/plugin.filler/fill-line-dataset-spline-span-below.png differ diff --git a/test/fixtures/plugin.filler/fill-line-dataset-spline-span.png b/test/fixtures/plugin.filler/fill-line-dataset-spline-span.png index 97cbb6d2f..feb4fefb9 100644 Binary files a/test/fixtures/plugin.filler/fill-line-dataset-spline-span.png and b/test/fixtures/plugin.filler/fill-line-dataset-spline-span.png differ diff --git a/test/fixtures/plugin.filler/fill-line-dataset-spline.png b/test/fixtures/plugin.filler/fill-line-dataset-spline.png index 8147e4d80..ed02242e3 100644 Binary files a/test/fixtures/plugin.filler/fill-line-dataset-spline.png and b/test/fixtures/plugin.filler/fill-line-dataset-spline.png differ diff --git a/test/fixtures/plugin.filler/fill-line-dataset-stepped.png b/test/fixtures/plugin.filler/fill-line-dataset-stepped.png index 072fc76bf..418bca44e 100644 Binary files a/test/fixtures/plugin.filler/fill-line-dataset-stepped.png and b/test/fixtures/plugin.filler/fill-line-dataset-stepped.png differ diff --git a/test/fixtures/scale.time/data-ty.png b/test/fixtures/scale.time/data-ty.png index 1690650c4..acb6dd5a4 100644 Binary files a/test/fixtures/scale.time/data-ty.png and b/test/fixtures/scale.time/data-ty.png differ diff --git a/test/fixtures/scale.time/data-xy.png b/test/fixtures/scale.time/data-xy.png index 1690650c4..acb6dd5a4 100644 Binary files a/test/fixtures/scale.time/data-xy.png and b/test/fixtures/scale.time/data-xy.png differ diff --git a/test/fixtures/scale.time/source-auto-linear.png b/test/fixtures/scale.time/source-auto-linear.png index 80eb07c73..bedfde067 100644 Binary files a/test/fixtures/scale.time/source-auto-linear.png and b/test/fixtures/scale.time/source-auto-linear.png differ diff --git a/test/fixtures/scale.time/source-data-linear.png b/test/fixtures/scale.time/source-data-linear.png index 7200319e3..a86d1954f 100644 Binary files a/test/fixtures/scale.time/source-data-linear.png and b/test/fixtures/scale.time/source-data-linear.png differ diff --git a/test/fixtures/scale.time/source-labels-linear-offset-min-max.png b/test/fixtures/scale.time/source-labels-linear-offset-min-max.png index 1f9bf9045..474638882 100644 Binary files a/test/fixtures/scale.time/source-labels-linear-offset-min-max.png and b/test/fixtures/scale.time/source-labels-linear-offset-min-max.png differ diff --git a/test/fixtures/scale.time/source-labels-linear.png b/test/fixtures/scale.time/source-labels-linear.png index 7200319e3..a86d1954f 100644 Binary files a/test/fixtures/scale.time/source-labels-linear.png and b/test/fixtures/scale.time/source-labels-linear.png differ diff --git a/test/fixtures/scale.time/ticks-reverse-linear-min-max.png b/test/fixtures/scale.time/ticks-reverse-linear-min-max.png index 5a2871571..8da6a228a 100644 Binary files a/test/fixtures/scale.time/ticks-reverse-linear-min-max.png and b/test/fixtures/scale.time/ticks-reverse-linear-min-max.png differ diff --git a/test/fixtures/scale.time/ticks-reverse-linear.png b/test/fixtures/scale.time/ticks-reverse-linear.png index 6c12592cf..ec0e7be09 100644 Binary files a/test/fixtures/scale.time/ticks-reverse-linear.png and b/test/fixtures/scale.time/ticks-reverse-linear.png differ