Data Labels

The chartjs-plugin-datalabelsarrow-up-right plugin is an extension library that allows labels to be turn on for the elements of chart.

By default, datalabels are turned off. To turn them on, use the pass-through for the native datalabels configurationarrow-up-right.

The following example turns on data labels and also changes their text to white.

const chart = new wire.chartjs().render("#chart", {
    ...
    datalabels: {
        display: true,
        color: "white"
    }    
});            

Library

Chart.js for WireBootstrap will load chartjs-plugin-datalabels.min.js from a CDNarrow-up-right if it's not found on the page.

Last updated

Was this helpful?