]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Update horizontal bar chart default tooltip mode (#7488)
authorEvert Timberg <evert.timberg+github@gmail.com>
Wed, 10 Jun 2020 11:50:15 +0000 (07:50 -0400)
committerGitHub <noreply@github.com>
Wed, 10 Jun 2020 11:50:15 +0000 (07:50 -0400)
Ensures that vertical and horizontal bar charts behave the same way

docs/docs/getting-started/v3-migration.md
src/controllers/controller.horizontalBar.js

index d568395d1da41b53b709f02a8e2ae90e2e437b57..ed19e0585b82910d8ae4d5b25ebe4cc5554aa8d7 100644 (file)
@@ -68,6 +68,7 @@ A number of changes were made to the configuration options passed to the `Chart`
 * `defaultFontSize` was renamed to `font.size`
 * `defaultFontStyle` was renamed to `font.style`
 * `defaultLineHeight` was renamed to `font.lineHeight`
+* Horizontal Bar default tooltip mode was changed from `'index'` to `'nearest'` to match vertical bar charts
 
 #### Scales
 
index d573412acca28a6bed2848f0196b6e05c46d9f46..054d5192b25b0e983f5d24e805ec5cfd64ad5701 100644 (file)
@@ -33,7 +33,6 @@ defaults.set('horizontalBar', {
        },
 
        tooltips: {
-               mode: 'index',
                axis: 'y'
        }
 });