Chart's X-axis lable rotation limitations- need help
Hi Team,
1. I am using Syncfusion chart Blazor, x-axis labels are having limited ways to rotate it, I need to make it in this way,
Currently if we do it in below way last label got partially hidden because of a space,
Please help me to make it like the first screenshot.
2. Also the Y-Axis label plotting is also with large gaps even we have data for the mid ones, for reference compare above two screenshots (0-5-10-...) and (0-10-20-...)
Thanks,
Kishor
Hi Kishor,
Greetings from Syncfusion.
1. I am using Syncfusion chart Blazor, x-axis labels are having limited ways to rotate it, I need to make it in this way,
Your requirement can be achieved by specifying LabelRotation as -25 for ChartPrimaryXAxis.
|
<SfChart> <ChartPrimaryXAxis LabelRotation="-25"></ChartPrimaryXAxis> </SfChart> |
Currently if we do it in below way last label got partially hidden because of a space.
By default, when axis labels extend beyond the chart area bounds, they will be cropped automatically. To prevent this and ensure the axis labels are fully visible without cropping, you can adjust the right margin of the chart.
|
<SfChart> <ChartMargin Right="20"></ChartMargin> </SfChart> |
2. Also, the Y-Axis label plotting is also with large gaps even we have data for the mid ones, for reference compare above two screenshots (0-5-10-...) and (0-10-20-...)
We suggest you to specify the Interval for ChartPrimaryYAxis to achieve your requirement. Please check with the below snippet and sample.
|
<SfChart> <ChartPrimaryYAxis Interval="5"></ChartPrimaryYAxis> </SfChart> |
Sample : https://blazorplayground.syncfusion.com/VNBzsNCHJxamRyGq
Please revert us if you have any concerns.
Regards,
Durga Gopalakrishnan.
- Thank you for label rotation, it worked.
- On Y-axis interval, if we keep constant 5 or any number, it will not be adjusted for larger range,
Kishore,
We suggested setting the interval based on your previous requirement. By default, when no interval is specified for the Y-axis, it is automatically calculated based on the provided Y-values in the datasource and the Y-axis height. We recommend removing the interval setting to allow for automatic interval calculation.
Please let us know if you have any concerns.
- 3 Replies
- 2 Participants
-
KI Kishor
- Oct 15, 2024 01:19 PM UTC
- Oct 17, 2024 01:53 PM UTC