I'm using 'ngx-charts' with Angular, on My X axis labels i have long text. how can i make it wrap on a couple of lines instead of using 3 dots when text overflows?
Update:
tried to add xAxisTickFormating func :
html file:
[xAxisTickFormatting]="xAxisTickFormat"
ts file:
xAxisTickFormat(val) {
return val.split(' ').map(i => `${i} \n`).join('');
}
Here's a workaround (see https://github.com/swimlane/ngx-charts/issues/462#issuecomment-783237600 too). You can create a tspan tag within the text tag containing the x label after the chart has been displayed completely. Assume you want to add the text "hello" in the second line of the 5. x-axis label:
More background: https://www.oreilly.com/library/view/svg-text-layout/9781491933817/ch04.html