Search code examples
chartschart.jsradar-chart

Make labels of ChartJS radar in a few rows


I create radar chart with ChartJS.

But when I have long labels than ChartJS scale chart and make it smaller.

The question is – can I make label text with ChartJS radar in a two rows? (usual <br>,/n doesn't work).

Seems like documentation doesn't provide this possibility.


Solution

  • You can use custom tooltips to use HTML elements to display the tooltip instead of canvas elements.

    There is an example at https://github.com/nnnick/Chart.js/blob/v1.0.2/samples/pie-customTooltips.html for pie charts that does this.