[Chartjs]-Drawing line chart in chart.js placing dots only when value changes

11๐Ÿ‘

โœ…

...
for (var i = 1; i <= data.datasets[0].data.length - 1; i++) 
    if (data.datasets[0].data[i - 1] === data.datasets[0].data[i])
        myChart.datasets[0].points[i].display = false;

where myChart is your chart object


Fiddle โ€“ http://jsfiddle.net/3tok57dL/

Leave a comment