Chartjs-Display Datalabel for an specific point in Chart Js

1👍

You could add the datalabels config to the line datasets, disabling the plugin, as the following:

var omx_dataset = {
     label: 'OMXS30',
     borderColor: '#eb8484',
     fill: false,
     pointRadius: 0,
     borderWidth: 1,
     data: []
      
     datalabels: {
       display: false
     }
};

var gadd_dataset = {
     label: "GADD SMP SEK",
     borderColor: '#001F5B',
     fill: false,
     pointRadius: 0,
     borderWidth: 1,
     data: [],
      
     datalabels: {
       display: false
     }
};

Leave a comment