chart label name font size and font family?

How to change the XAxis label's font size and font family chart in mvc?

.PrimaryXAxis(px => px.ValueType(Syncfusion.EJ2.Charts.ValueType.Category).EnableTrim(false).MaximumLabelWidth(1).LabelIntersectAction(Syncfusion.EJ2.Charts.LabelIntersectAction.None).LabelRotation(-45).CrossesAt(0).Interval(1).MajorTickLines(mt => mt.Width(0)).MajorGridLines(mg => mg.Width(0)).LineStyle(ls => ls.Width(2)))


1 Reply

DG Durga Gopalakrishnan Syncfusion Team September 2, 2022 04:21 PM UTC

Hi Maulana,


Greetings from Syncfusion.


We suggest you to use LabelStyle property to customize axis label. Please check with the below snippet and sample.


@Html.EJS().Chart("container").PrimaryXAxis(px => px.LabelStyle(ls=>ls.Size("14px").FontFamily("Arial Black"))

).Render()




Sample : https://www.syncfusion.com/downloads/support/directtrac/general/ze/LableStyle-1467461196.zip


Kindly revert us if you have any concerns


Regards,

Durga Gopalakrishnan.


Loader.
Up arrow icon