Possible regression and other issues with .Cells .Net DataLabels

Hi there,


Considering upgrading from 5.2.2, however, upon trialing the latest Aspose.Cells we have hit what seems a regression and also a couple of other issues.

In 5.2.2 I could happily get the DataLabels.X property, now it always returns 0. Please see attached workbook example and below test code:

Workbook categoryTest = new Workbook(“categories_test_a.xlsx”);
Chart tChart = categoryTest.Worksheets[0].Charts[0];
int iWouldLikeTheLeft = tChart.NSeries[0].Points[0].DataLabels.X;

Notice how in version 5.2.2 we get the value of -368 for the variable but now in 7.5.0.0 it is always 0.

So then if I call
tChart.NSeries[0].Points[0].DataLabels.X += 100;

then the label does not behave with a 100 change from it’s starting position.

The other issue is DataLabels.Y always returns 0. We would like to get and then set this value i.e.:

int startYvalue = tChart.NSeries[0].Points[0].DataLabels.Y;
tChart.NSeries[0].Points[0].DataLabels.Y += 100;

Finally, the Width property always returns 0, in vba I can get to this property with no problem. i.e.

int iWouldLikeTheWidth = tChart.NSeries[0].Points[0].DataLabels.Width;

Does not give the width of the datalabel, it always returns 0 - I would like the width so that I can move datalabels around and stop then overlapping - obviously also need the X and Y’s too though!

Is there a workaround to be able to move DataLabels and get their width, or is this 1 regression and 2 Aspose.Cells bugs? Please feel free to log this as either 3 seperate issues or combine into 1.

Kind regards,
Adam

Attached this time :wink:

Hi,


Please download and try our latest fix/version: Aspose.Cells for .NET v7.5.0.5 with the following codes if it works fine for your needs.


Workbook categoryTest = new Workbook(“e:\test2\categories_test_a.xlsx”);
Chart tChart = categoryTest.Worksheets[0].Charts[0];
tChart.Calculate();
int iWouldLikeTheLeft = tChart.NSeries[0].Points[0].DataLabels.X;
int startYvalue = tChart.NSeries[0].Points[0].DataLabels.Y;
int iWouldLikeTheWidth = tChart.NSeries[0].Points[0].DataLabels.Width;



Thank you.

Not bad - using 7.5.0.5 and the calculate method let me get X, Y and Width.

However, using this solution causes a new bug with the datalabels - in the input sheet you will see they have a fill color and a border line - after using this solution and saving the fill and border disappear:

Workbook categoryTest = new Workbook("categories_test_a.xlsx");
Chart tChart = categoryTest.Worksheets[0].Charts[0];
tChart.Calculate();
int iWouldLikeTheWidth = tChart.NSeries[0].Points[0].DataLabels.Width;

int iWouldLikeTheTop = tChart.NSeries[0].Points[0].DataLabels.Y;

int iWouldLikeTheLeft = tChart.NSeries[0].Points[0].DataLabels.X;

tChart.NSeries[1].Points[0].DataLabels.X += 100;

tChart.NSeries[1].Points[0].DataLabels.Y += 100;

tChart.NSeries[2].Points[0].DataLabels.X += 100;

categoryTest.Save("output.xlsx");

I have attached a screenshot showing the before on the left and after on the right.

Hi,


Thanks for providing sample code and details.

After an initial test using your code with your template file, I observed the issue as you mentioned. The Series data labels’ fill color and borders disappear after repositioning. I have logged a ticket with an id “CELLSNET-41830” for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.

Hi,

Please download and try our latest version/fix: Aspose.Cells for .NET v7.5.1.2.

We have fixed the saving data labels issue.


Let us know your feedback.

Thank you.

Hi - Good and bad news:


The good news: 7.5.1.2 fixes the colour issue.

The bad news, there is a second regression that I did not spot the first time:

If I set the font size of the labels to 14 and then open in Aspose and save, then the labels lose there sizing and are size 11 in size. Please see attached workbook and picture, and then easy code below. In the picture you can see the fotn size has reduced (even though excel displays it as 14 still).

Workbook categoryTest = new Workbook(“categories_test_fonts.xlsx”);
categoryTest.Save(“output.xlsx”);

I imagine there is a good chance this can be fixed in a similar way?

I don’t mind if you open a new tracking id or use the same, please let me know which.

Hi,


Thanks for the sample file and sharing the sample code.

After an initial test, I observed the issue as you mentioned by using your template file and code. The font size of data labels has changed a bit when we simply open and re-save the file by Aspose.Cells APIs.

Sample code:
Workbook categoryTest = new Workbook(“e:\test2\categories_test_fonts.xlsx”);
categoryTest.Save(“e:\test2\output1.xlsx”);

I have logged a separate ticket with an id “CELLSNET-41857” for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.


Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Please download and try this fix: Aspose.Cells for .NET v7.5.1.3.

I can confirm that the fix in 7.5.1.3 is good.

Hi,


Good to know that your issue is resolved by the new fix.

Feel free to contact us any time if you need further help or have some other issue, we will be happy to assist you soon.

Thank you.

The issues you have found earlier (filed as CELLSNET-41830) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan