3

I see that an array can be used to create multiline labels in chartjs. Chart.js and long labels

I want a multiline scaleLabel. Currently the array displays the result on one line. Any help is greatly appreciated.

scales: {
    xAxes: [{
        stacked: true,
        scaleLabel: {
            display: true,
            labelString: [[firstCategory + ': ' + avg1], [ secondCategory + ': ' + avg2]],
            fontSize: 20
        }
    }],
    yAxes: [{
        stacked: true
    }]
}
Mush
  • 45
  • 2
  • 11

0 Answers0