From f7f177f5ade62a0969596bdfff773b404425047d Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 30 May 2017 01:40:10 +0300 Subject: [PATCH] Implemented aligment by senior unit in time axis. (#4267) Implemented alignment by major unit in the time scale. This allows showing the first tick of a larger unit like days in a special way and is part of the basis of the time series scale. --- samples/scales/time/line-point-data.html | 8 +-- samples/scales/time/line.html | 38 +++++++-------- src/helpers/helpers.time.js | 42 +++++++++++++--- src/scales/scale.time.js | 9 +++- test/specs/scale.time.tests.js | 62 +++++++++++------------- 5 files changed, 93 insertions(+), 66 deletions(-) diff --git a/samples/scales/time/line-point-data.html b/samples/scales/time/line-point-data.html index 0a221624b..e28f883f2 100644 --- a/samples/scales/time/line-point-data.html +++ b/samples/scales/time/line-point-data.html @@ -77,10 +77,10 @@ }, options: { responsive: true, - title:{ - display:true, - text:"Chart.js Time Point Data" - }, + title:{ + display:true, + text:"Chart.js Time Point Data" + }, scales: { xAxes: [{ type: "time", diff --git a/samples/scales/time/line.html b/samples/scales/time/line.html index 221354f9e..0cca931e0 100644 --- a/samples/scales/time/line.html +++ b/samples/scales/time/line.html @@ -28,7 +28,7 @@