From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Mon, 1 Mar 2021 20:27:36 +0000 (-0800) Subject: Add test for normalized option (#8552) X-Git-Tag: v3.0.0-beta.13~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc8e513d0fb1a144e7c5a4b730f6c7050a9c7215;p=thirdparty%2FChart.js.git Add test for normalized option (#8552) --- diff --git a/test/fixtures/scale.timeseries/normalize.js b/test/fixtures/scale.timeseries/normalize.js new file mode 100644 index 000000000..fe850b87b --- /dev/null +++ b/test/fixtures/scale.timeseries/normalize.js @@ -0,0 +1,39 @@ +module.exports = { + threshold: 0.01, + config: { + type: 'line', + data: { + datasets: [{ + data: [ + {x: '2017', y: null}, + {x: '2018', y: 1}, + {x: '2019', y: 2}, + {x: '2020', y: 3}, + {x: '2021', y: 4} + ], + fill: false + }] + }, + options: { + normalized: true, + scales: { + x: { + type: 'timeseries', + time: { + parser: 'YYYY' + }, + distribution: 'linear', + ticks: { + source: 'data' + } + }, + y: { + display: false + } + } + } + }, + options: { + spriteText: true + } +}; diff --git a/test/fixtures/scale.timeseries/normalize.png b/test/fixtures/scale.timeseries/normalize.png new file mode 100644 index 000000000..22077797b Binary files /dev/null and b/test/fixtures/scale.timeseries/normalize.png differ