[Chartjs]-Dashed gridlines in Chart.js version 4.x

3👍

Since version 4, the border is a specific config node of the axes.

See Migration guide: https://www.chartjs.org/docs/latest/migration/v4-migration.html#specific-changes

Your config should be:

scales: {
   y: {
     border: {
       dash: [5, 5],
       display: true
     } 
     grid: {
        drawTicks: false,
        display: true
     }
   }
}

Leave a comment