Accepted answer

i was able to figure this out, instead of displaying the whole value, which in the current case was an object, i had to use formatter with a callback function fetching value of x, in the plugins option.

options: {
            plugins: {
                datalabels: {
                    formatter: ( val ) => {
                        return val.x

Related Query

More Query from same tag