Open Mikarrori opened 1 year ago
it seems that this plugin doesn't like data of which the structure is an object, as i inspected the value
args of the formatter
option, it was undefined when the data structure is an object.
Problem solved by:
formatter: (value, context) => {
let keys = Object.keys(context.dataset.data)
let key = keys[context.dataIndex]
return context.dataset.data[key]
}
not a good solution though
Ty, I was running through the same scenario as you.
@Mikarrori Can't really help without a way to debug your issue. Since it's an old ticket, I hope you fixed your problem. If not, please provide a codepen that reproduces your use case.
Tried chart.registry(datalabels) and plugins: [datalabels], no errors throwed and nothing happens.
Any hints or tips are appreciated.