Negative number miss minus at web with pie chart

Hi,


Attachment is the demo, please have a look.

In my demo, there are 11 items, the last one which named “Other” is negative, but on the website, the minus is missing.

Hi,


Thanks for the sample project.

I can observe the issue as you mentioned. After using the project provided by you, the Negative number is missing the minus sign in the output image of the Pie chart. In your demo, there are 11 items, the last one which named “Other” is negative, but on the website, the minus is missing.

In the saved Excel file, it works fine though and the minus sign is attached with the “Other” data point on Pie chart. Also, by the way, you should use the line instead to save to XLSX file:
rpt.Save(Response, “Pie Chart.xlsx”, ContentDisposition.Attachment, New OoxmlSaveOptions())

I have logged a ticket with an id “CELLSNET-41759” for your issue. We will look into your issue soon. Once we have any update on it, we will let you know here.

Thank you.

Hi,Amjad,


Thanks for your answer.

I think your solution maybe couldn’t solve this issue. I want to get the chart from Workbook object, because it need to be displayed in the web page.

Here is the sample code(VB.Net) about my need:

Dim wb As Workbook = New Workbook(filePath)
Dim bitmap As System.Drawing.Bitmap = wb.Worksheets(0).Charts(0).ToImage()
Using ms = New MemoryStream()
bitmap.Save(ms, ImageFormat.Png)
Dim result As Byte() = ms.ToArray()
End Using

“result” is my want.

Hi,


Well, I did not provide you any solution or fix yet. I only suggested you to update the line of code to:
rpt.Save(Response, “Pie Chart.xlsx”, ContentDisposition.Attachment, New OoxmlSaveOptions()) when you are saving to Excel 2007/2010 XLSX file format.

As we have already logged a ticket with an id “” for your issue, your issue is actually related to Chart-to-Image feature. Once we figure it out, we will let you know here with either a fix or a workaround.

Thank you.

Hi,

Please download and try this fix: Aspose.Cells for .NET v7.5.0.2 and let us know your feedback.

Please try the new fix and change the source project for generating Excel 2007 or later versions of chart.

  1. Dim wb = New Workbook() to Dim wb = New Workbook(FileFormatType.Xlsx) in Function Process() of TPie.vb

  2. rpt.Save(Response, “Pie Chart.xlsx”, Aspose.Cells.ContentDisposition.Attachment, New XlsSaveOptions())

to:

rpt.Save(Response, “Pie Chart.xlsx”, Aspose.Cells.ContentDisposition.Attachment, New OoxmlSaveOptions()) in Sub btnExport_Click() of Default.aspx.vb

Thank you.

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


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