Multiple labels with sum of stack. #396
Unanswered
iBreadInside
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! For now I use the plugin to show counter inside of each bar. Also I wrote a custom plugin based on this video to show a sum of each stack.

Custom plugin code:
`export const barSumPlugin: Plugin<'bar'> = {
id: 'barSum',
afterDatasetsDraw(chart, args, options, cancelable) {
const {
ctx,
scales: { x },
} = chart
},
}`
But I don't know how to rotate sum counters if they doesn't fit.

Is it possible to rotate them or to write multiple labels with chartjs-plugin-datalabels: for each bar and a total sum of stack? Can you help me with this?
Beta Was this translation helpful? Give feedback.
All reactions