Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Thu Feb 12, 2015 7:11 pm

Hi,

I am trying to rotate the data label text to 270 or -90, but it never rotate as expected.

Here is the code:

foreach (Spire.Xls.Charts.ChartSerie cs in chart.Series)
{
//Set vary color of the chart
cs.Format.Options.IsVaryColor = true;
//Set Gap Width
cs.Format.Options.GapWidth = 0;
//Set the value is visible on the chart
cs.DataPoints.DefaultDataPoint.DataLabels.HasCategoryName = true;
cs.DataPoints.DefaultDataPoint.DataLabels.TextRotationAngle = 270;// <------ Used to rotate the DataLabel Text
cs.DataPoints.DefaultDataPoint.DataFormat.BarType = BaseFormatType.Rectangle;
cs.DataPoints.DefaultDataPoint.DataLabels.VerticalAlignment = FontVertialAlignmentType.Baseline;
cs.DataPoints.DefaultDataPoint.DataLabels.Position = DataLabelPositionType.OutsideBase;
}

Any advise will be greatly appreciated.

markc
 
Posts: 2
Joined: Thu Feb 12, 2015 6:57 pm

Fri Feb 13, 2015 1:59 am

Hello,

I failed to reproduce this problem with the lastest version of Spire.XLS Pack Hotfix. Please check the attachment. Please download Spire.XLS Pack Hotfix version:7.6.36 from the following link and try again:
http://www.e-iceblue.com/Download/downl ... t-now.html
The dll files used:
Spire.Common V1.2.214.7040
Spire.License V1.3.4.40
Spire.Pdf V3.2.103.7040
Spire.XLS V7.6.36.7040
Please feel free to contact us if you have any questions or needs.

Best Regards,
Betsy
Attachments
output.zip
(9.42 KiB) Downloaded 403 times
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Fri Feb 13, 2015 4:53 pm

Hello Betsy,

I downloaded the hotfix and installed it.
Now the function works fine.
Thank you for your assistance and wish you have a wonderful new year!

markc
 
Posts: 2
Joined: Thu Feb 12, 2015 6:57 pm

Mon Feb 16, 2015 9:53 am

Hello,

Glad to hear that. Please contact us if you have any questions or needs.

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.XLS