[Chartjs]-Chart.js – how to draw a thicker horizontal line at the zero point of a graph with negative and positive values

1πŸ‘

βœ…

It’s mentioned at the Styling section in the docs and it’s called lineWidth.

This related question might also be helpful: Chart.js how to use scriptable options

options {
  scales: {
    y: {
      grid: {
        lineWidth: ({ tick }) => tick.value == 0 ? 10 : 1
      }
    }
  }
}

Leave a comment