Charts out of alignment for multi chart scenario


I am using  https://blazor.syncfusion.com/documentation/chart/date-time-axis#datetime-category-axis and Y Axis is 

OpposedPosition="true"


Two different SfCharts one below another instead same change multi row.

I have tried to setup LabelPadding but the charts are not aligned as the values of Y Axis varies

Image_6804_1732090992290



Is there any way to get the width of the Y labels or something to keep the Y Axis aligned


thanks



1 Reply

DG Durga Gopalakrishnan Syncfusion Team November 21, 2024 12:22 PM UTC

Hi Praveen,


You can set the MaximumLabelWidth for the y-axis to align the vertical axes of both charts. The default width is 34, and if the label width exceeds this value, it will be automatically trimmed when EnableTrim is set to true. To achieve the desired result, we have set the axis label width to 25. Please refer to the snippet and sample below.


<SfChart ID="chart2">

    <ChartPrimaryYAxis EnableTrim="true" MaximumLabelWidth="25" OpposedPosition="true">

    </ChartPrimaryYAxis>

</SfChart>




Sample : https://blazorplayground.syncfusion.com/rDhpMirMJZVTVbXh


UG : https://blazor.syncfusion.com/documentation/chart/axis-labels#trim-label


Kindly revert us if you have any concerns.


Regards,

Durga Gopalakrishnan.


Loader.
Up arrow icon