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
close icon

X-axis label rotation

I have defined my X-axis label as follow, however the x-axis label refuses to rotate as per instructed. Could you please let me know if I'm missing something?
Me.ChartWebControl1.PrimaryXAxis.ValueType = ChartValueType.DateTime
Me.ChartWebControl1.PrimaryXAxis.DateTimeRange = New ChartDateTimeRange(CDate("01/Nov/2007"), CDate("30/Nov/2007"), 5, ChartDateTimeIntervalType.Days)
Me.ChartWebControl1.PrimaryXAxis.DateTimeFormat = "dd/MM/yyyy"
Me.ChartWebControl1.ChartArea.PrimaryXAxis.LabelRotate = True
Me.ChartWebControl1.ChartArea.PrimaryXAxis.LabelRotateAngle = 90
Me.ChartWebControl1.ChartArea.PrimaryXAxis.LabelAligment = StringAlignment.Center


1 Reply

SS Sri Subhashini M Syncfusion Team December 12, 2007 05:37 AM UTC

Hi,

Thank you for posting your query to us.

I am afraid that I was not able to reproduce the issue. I have used the following code to rotate the chart label.

Me.ChartWebControl1.PrimaryXAxis.ValueType = ChartValueType.DateTime
Me.ChartWebControl1.PrimaryXAxis.DateTimeRange = New ChartDateTimeRange(CDate("01/Nov/2007"), CDate("30/Nov/2007"), 5, ChartDateTimeIntervalType.Days)
Me.ChartWebControl1.PrimaryXAxis.DateTimeFormat = "dd/MM/yyyy"
Me.ChartWebControl1.ChartArea.PrimaryXAxis.LabelRotate = True
Me.ChartWebControl1.ChartArea.PrimaryXAxis.LabelRotateAngle = 90
Me.ChartWebControl1.ChartArea.PrimaryXAxis.LabelAligment = StringAlignment.Center

I have created a simple sample to test this issue with different version and it works fine.

Please look into the sample images which has taken from different versions.

http://www.syncfusion.com/support/user/uploads/SampleImage_F70406_416d86cd.zip

The sample is available in the following link.
http://websamples.syncfusion.com/samples/Chart.Web/6.1.0.34/70406/main.htm

Please have a look at the above sample and if still the issue exists let me know at which version you are getting the issue so that we could sort out the cause of the issue and provide you a solution.

Regards,
Suba


Loader.
Live Chat Icon For mobile
Up arrow icon