0👍
You can set the labels as an array of string or string[].
See doc: https://www.chartjs.org/docs/latest/axes/cartesian/category.html#category-axis-specific-options
In your case:
const data = {
labels: ["Label 1", ["Very very very", "very long name", "that is cut off"]],
datasets: [
{
axis: "y",
label: "Count",
backgroundColor: "#000",
data: [10, 24],
},
],
};
- Chartjs-Chart.js – Why the chart cannot rendered in a child component but in the father component can?
- Chartjs-Bar chart is not grouped properly in chartjs
Source:stackexchange.com