You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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