From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Mon, 6 Jul 2020 13:35:16 +0000 (-0700) Subject: Enable autoSkip for time scale to match others (#7570) X-Git-Tag: v3.0.0-beta.2~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a33086bfc13d08f6421ea15ef91b56331d2f2551;p=thirdparty%2FChart.js.git Enable autoSkip for time scale to match others (#7570) --- diff --git a/docs/docs/getting-started/v3-migration.md b/docs/docs/getting-started/v3-migration.md index 73cb4d04f..c3f3a929b 100644 --- a/docs/docs/getting-started/v3-migration.md +++ b/docs/docs/getting-started/v3-migration.md @@ -156,7 +156,8 @@ options: { } ``` -Also, the time scale option `distribution: 'series'` was removed and a new scale type `timeseries` was introduced in its place. +* The time scale option `distribution: 'series'` was removed and a new scale type `timeseries` was introduced in its place +* In the time scale, `autoSkip` is now enabled by default for consistency with the other scales #### Animations diff --git a/src/scales/scale.time.js b/src/scales/scale.time.js index e5c63913f..61e2491b7 100644 --- a/src/scales/scale.time.js +++ b/src/scales/scale.time.js @@ -219,8 +219,6 @@ const defaultConfig = { displayFormats: {} }, ticks: { - autoSkip: false, - /** * Ticks generation input values: * - 'auto': generates "optimal" ticks based on scale size and time options. diff --git a/test/specs/scale.time.tests.js b/test/specs/scale.time.tests.js index 45c92df4e..1287a75d0 100644 --- a/test/specs/scale.time.tests.js +++ b/test/specs/scale.time.tests.js @@ -88,7 +88,7 @@ describe('Time scale tests', function() { padding: 0, display: true, callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below, - autoSkip: false, + autoSkip: true, autoSkipPadding: 0, labelOffset: 0, minor: {},