[Chartjs]-Chart.js โ€“ How to display title in multiple lines?

27๐Ÿ‘

โœ…

try giving title as string[] array as shown in below example.

var chart = new Chart(ctx, {
        type: 'line',
        data: data,
        options: {
            title: {
                display: true,
                text: ['Chart.js','Line Chart']
            }
        }
    })

Please go through the reference for more details. http://www.chartjs.org/docs/latest/configuration/title.html

enter image description here

Hope this helps you.

Leave a comment