Chartjs-Change line to dashed if it is a certain label Chart.js

0👍

I ended up figuring out the answer to this problem.

for (i = 0; i < chart.data.datasets.length; i++) {
        if ((chart.data.datasets[i].label == 'Last Place') || (chart.data.datasets[i].label == 'First Place')) {
            chart.data.datasets[i].borderDash = [1, 3];
        }

    }

    chart.update();

Leave a comment