]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Enable autoSkip for time scale to match others (#7570)
authorBen McCann <322311+benmccann@users.noreply.github.com>
Mon, 6 Jul 2020 13:35:16 +0000 (06:35 -0700)
committerGitHub <noreply@github.com>
Mon, 6 Jul 2020 13:35:16 +0000 (09:35 -0400)
docs/docs/getting-started/v3-migration.md
src/scales/scale.time.js
test/specs/scale.time.tests.js

index 73cb4d04f40dc503172b9cb436b3682176dab205..c3f3a929bdcb67d1d9fcc2a8a8e422e1de41a894 100644 (file)
@@ -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
 
index e5c63913f7c492a5525d630fbbb5c8b0bb0779a1..61e2491b707248126b1aae407d2bfbad323167b0 100644 (file)
@@ -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.
index 45c92df4eed525e47a0163a06cd73d91594d7039..1287a75d053931e70af02efd4156564461424181 100644 (file)
@@ -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: {},