From 4cc6628d52e656cb6a14c09df3cc712756c70fc5 Mon Sep 17 00:00:00 2001 From: Jukka Kurkela Date: Wed, 20 Feb 2019 15:35:05 +0200 Subject: [PATCH] regression test for chart area clipping --- .../controller.bar/chart-area-clip.js | 42 ++++++++++++++++++ .../controller.bar/chart-area-clip.png | Bin 0 -> 1711 bytes 2 files changed, 42 insertions(+) create mode 100644 test/fixtures/controller.bar/chart-area-clip.js create mode 100644 test/fixtures/controller.bar/chart-area-clip.png diff --git a/test/fixtures/controller.bar/chart-area-clip.js b/test/fixtures/controller.bar/chart-area-clip.js new file mode 100644 index 00000000000..2d552dcd4de --- /dev/null +++ b/test/fixtures/controller.bar/chart-area-clip.js @@ -0,0 +1,42 @@ +module.exports = { + config: { + type: 'bar', + data: { + labels: [0, 1, 3, 4], + datasets: [ + { + data: [5, 20, -5, -20], + borderColor: '#ff0000' + } + ] + }, + options: { + legend: false, + title: false, + layout: { + padding: { + left: 0, + right: 0, + top: 50, + bottom: 50 + } + }, + elements: { + rectangle: { + backgroundColor: '#00ff00', + borderWidth: 8 + } + }, + scales: { + xAxes: [{display: false}], + yAxes: [{display: false, ticks: {min: -10, max: 10}}] + } + } + }, + options: { + canvas: { + height: 256, + width: 512 + } + } +}; diff --git a/test/fixtures/controller.bar/chart-area-clip.png b/test/fixtures/controller.bar/chart-area-clip.png new file mode 100644 index 0000000000000000000000000000000000000000..8c59a70128ba8deebe6694b148b2046b3b416f4b GIT binary patch literal 1711 zcmeAS@N?(olHy`uVBq!ia0y~yU;;83893O0)X@p&(is@o$~;{hLn`LHy?!uP*^t5c z;!B0vU3=LfW7@j=iKk)4j<4E*B{s@k%-LUUp%=zQ(pJ#vmy8JyOIQI@n3LjpD1ce14 ft&4bu1OFfB`%joSi?^xoA;>aMS3j3^P6