We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to display chart axes label in custom format?

Platform: WinForms |
Control: Chart


Essential Chart supports customizing Chart Axes Labels. We can customize its label, line and range type.Y axis can be customized using subset properties of PrimaryYAxis property. X axis can be customized using subset properties of PrimaryXAxis property.

Range & RangeType properties are used to set the Range of the Axis. Ticks are used to point the Axes value points. TickColor & TickSize properties are used to set the tick size and color for ticks.

When the label for axes value is longer, the labels get overlapped. To avoid this we can rotate it and make it readable. LabelRotate gives access to rotate the label to the angle specified in LabelRotateAngle property.


// Specifying Axis Range

this.chartControl1.PrimaryXAxis.RangeType = ChartAxisRangeType.Set;

this.chartControl1.PrimaryXAxis.Range = new MinMaxInfo(1999, 2005, 1);

this.chartControl1.PrimaryXAxis.RangePaddingType = ChartAxisRangePaddingType.Calculate;

// Setting Font Properties

this.chartControl1.PrimaryXAxis.Font = new Font("Verdana", 8f, FontStyle.Bold);

this.chartControl1.PrimaryXAxis.ForeColor = Color.Green;

// Specifying Tick Properties

this.chartControl1.PrimaryXAxis.TickColor = Color.Blue;

this.chartControl1.PrimaryXAxis.TickSize = new Size(3, 3);

// Specifying Label Properties

this.chartControl1.PrimaryXAxis.LabelRotate = true;

this.chartControl1.PrimaryXAxis.LabelRotateAngle = 45;


' Specifying Axis Range

Me.ChartControl1.PrimaryXAxis.RangeType = ChartAxisRangeType.Set

Me.ChartControl1.PrimaryXAxis.Range = New MinMaxInfo(1999, 2005, 1)

Me.ChartControl1.PrimaryXAxis.RangePaddingType = ChartAxisRangePaddingType.Calculate

' Setting Font Properties

Me.ChartControl1.PrimaryXAxis.Font = New Font("Verdana", 8.0F, FontStyle.Bold)

Me.ChartControl1.PrimaryXAxis.ForeColor = Color.Green

' Specifying Tick Properties

Me.ChartControl1.PrimaryXAxis.TickColor = Color.Blue

Me.ChartControl1.PrimaryXAxis.TickSize = New Size(3, 3)

' Specifying Label Properties

Me.ChartControl1.PrimaryXAxis.LabelRotate = True

Me.ChartControl1.PrimaryXAxis.LabelRotateAngle = 45

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile