Hi Gabriel,
Greetings from Syncfusion.
We have analysed your query and suggest you to use axisLabelRender event to customize the axis labels dynamically. We have specified different sizes for axis labels based on the chart width within the axisLabelRender event. Also, we have modified your provided sample and attached the same for your reference. Please check with the below snippet and sample.
Code Snippet
|
<ejs-chart #chart (axisLabelRender)="axisLabelRender($event)" >
</ejs-chart>
public axisLabelRender(args: IAxisLabelRenderEventArgs): void {
if(args.axis.name =="primaryXAxis"){
if(this.chart.availableSize.width <= 200)
args.labelStyle.size = "8px";
//…
else
args.labelStyle.size = "20px";
}
} |
Sample
UG
Kindly revert us, if you have any further queries.
Regards,
Durga G