Skip to content

Commit

Permalink
Add Chart.js<v3.7 workaround for polygon annotaton
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle committed Dec 17, 2021
1 parent 8532960 commit 97383e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/annotation.js
Expand Up @@ -20,9 +20,12 @@ export default {
if (versionParts[0] === '3' && parseInt(versionParts[1], 10) <= 6) {
// Workaround for https://github.com/chartjs/chartjs-plugin-annotation/issues/572
Chart.defaults.set('elements.lineAnnotation', {
// label
callout: {},
font: {},
padding: 6
padding: 6,
// polygon
point: {},
});
}
},
Expand Down

0 comments on commit 97383e3

Please sign in to comment.