Textboxes / Lines and Charts (excel cs. pdf)

Hi, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I found an issue if you add textboxes to a chart. Please find the sample attached. I arrange textboxes in different rows above the plot area. If I take a look at the excel file it is conspicuous that the textboxes of the first row are higher the other textboxes. But as you can see in the source code, each textbox has the same height. Additionally the second and third row are placed to low. They should appear above the plot area. Remarkably, if you save the xls file in pdf format, everything looks like it is expected.

Finally there are slight differences between the end points of the inserted lines if you compare the excel and the pdf file. In excel (there it is shown correct) each line touches the category axis. In contrast the pdf file shows a small gab between the line and the x-axis.

Thanks in advance

Erik

Hi Erik,

After an initial test, we noticed some differences b/w the generated excel file and the output pdf file.

Your issue has been added to our issue tracking system with an issue id: CELLSNET-13487.

We will figure it out and update you soon.

Thank you.

Hi,

We have done
some changes for the position of shapes. Please try the fix attached.<o:p></o:p>

Please make sure that the code i.e.., chart.Calculate() is called after changing the value of the plot area and set the TickLabelSpacing of category axis to 5.


Kindly let us know if you still find any issue.

Thank you.

Hi, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Unfortunately I don’t see any improvement.

- Changing the height of the plot area has also an effect on the width of the plot area. It also seems, that the left margin between chart and plot area becomes bigger, when the height of the plot area decrease.

- Using the TickLabelSpacing Property leads to an unexpected placement of the inserted textboxes. If I use this property five of the six textboxes become invisible and the position of the remaining one shifts to the right side.

Please find attached the used code to reproduce the problems. (It includes three different variants to show the problem. My aim is to change the height and the TickLabelSpacing property without side effects)

Thanks in advance

Erik

Hi Erik,

We will further look into your issue and get back to you soon.

Thank you.

Hi,


Please try the attached sample code with the new fix 4.8.2.3 (attached).

The image position and text position works better in the xls file.

We are still working on fixing the issue of converting cells to pdf file. We hope we can provide a fix for this issue in the next week.


Thank you.

Hi, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the latest aspose version. The result looks quite good. I’m looking forward to get the final fix for the issue.

Thanks in advance

Regards

Erik

Hi,

Please try the attached version. We have fixed your issue.

Thank you.

Hi, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

After implementing the initial report I started to roll out the new reporting system to other use cases. For this reason I had to change the scale of the category axis of some line charts. After adding the textboxes and lines to the chart I noticed that there are big differences between the position of the line and the tick labels. The further you move to the right (into the future) on the category axis, the bigger is the gap. It is possible to increase the precision to integrate the lines into the chart? In some cases it works fine, but there are also examples that look like the chart provided in the example files.

Would it be possible to get a solution by Friday? If the issue is fixed we would like to start our new reporting system on next Monday.

Thanks in advance

Erik

Hi Erik,

Thanks for providing us the sample files with code.

We will look into your issue and get back to you soon.

Thank you.

Hi, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I would like to now whether you are able to fix this issue by next Monday morning <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />8:00 o’clock?

Many thanks in advance

Best regards

Erik

Hi Erik,

2/13-2/20 are Chinese New Year Holidays. All our developers for Aspose.Cells are from China so they are on their holidays. We will work on this issue when we are back to office. Thanks for your patience.

Hi, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I guess you could consider this issue as fixed. After I did a workaround to ensure the correct position of the additional graphical elements I reviewed my code. Thereby I noticed that I calculated the unit value as an integer as shown by Nausherwan in his post.

int unit = (int)(width / (dataCount / (double)tickSpacing)+0,5);

chart.Shapes.AddShapeInChart(MsoDrawingType.Line, PlacementType.MoveAndSize, x + unit * 2, 0, x + unit * 2 + 1, 4000, null);

This method works fine for chart entries which are close to the value axis because rounding errors have only a small effect in this situation.

The following lines of code solve the issue

//

double unit = (width *1.0 / (dataCount) );

chart.Shapes.AddShapeInChart(MsoDrawingType.Line, PlacementType.MoveAndSize, x + (int)(unit * index),top + 80, x + (int)(unit * index) , 4000 - (4000 - y - height), null);

Regards

Erik

Hi Erik,

We have improved the related module. Please try the attached fix.
We checked your code and found there are only 134 source data count and the
last 2 cells of the source data are null. So, you need to modify your code to following.

Axis xAxis = chart.CategoryAxis;
double unit = width * xAxis.MajorUnit / ((double)xAxis.MaxValue -
(double)xAxis.MinValue);


Thank you.

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.