Invalid chart formatting

Hi

I'm evaluating your .net component aspose.cell. I need to create a bmp from a chart inside of a worksheet. In excel, the chart looks fine. when i create a bmp with ToImage().. the chart has another terribel formating as the source chart in excel. I also tried to configure the chart manually by code but i hadn't success.

Can you tell me how i can get exactly the same view as excel from a chart and convert it to a picture?

my code:

System.Drawing.Bitmap locChartBitmap = locWorkbook.Worksheets[0].Charts[0].ToImage();
locChartBitmap.MakeTransparent();
string locSavePath = SH.Helper.Filename.BuildFilename(Guid.NewGuid().ToString("N"), BE.Enums.FileType.CHART, SH.Helper.ApplicationSettings.ImagesDirectoryPath);
locChartBitmap.Save(locSavePath);

Thank you for your help.

sincerly,
dave

Hi Dave,

Thanks for considering Aspose.

It looks strange to us that the chart's formatting disturbed when you convert the chart to image. Did the image got converted fine or not?

And Aspose.Cells can covert charts to image files but not all the chart are supported as we are working to support the maximum chart types, kindly check the supported chart list: Converting Chart to Image

Could you give us the template files one that stores your designer chart (original template) and the second one with disturbed formattings chart using Aspose.Cells. We will check and figure it out soon.

And by the way which version you are using, we did some enhancement related chart 2 image feature, kindly try the attached version.

Thank you.

Hello,

Thank you for your Answer. I have attached a excel-file with a chart. in this case the toimage-method create a black chart with strange data and incorrect direction of the axis?

i need to transfer an chart-object to a word-file without using linked objects. is there another way to insert the chart into a word-file with exactly the same formating as it is in excel?

Thank you.

Hello,

another problem is that the valueaxis with datetime-data is in wrong direction. the newest date is on the left and the oldest on the right.

how can i change the direction of this axis?

greetings

Hi,

Thanks for template file with the designer chart.

We are in the process to enhance chart 2 image feature. We will get back to you soon.

Thanks for being patient!

Hi,

Thank you ver much for this bugfix. I could not download the zip-file. it is corruped when i will open it after download. can you send me the file per email?

greetings

dave

Hi Dave,

I re-attach the hofix again, hopfully now it will be fine.

Thank you.

Hello,

I've checked my application with the hotfix. Unfortunatly there is still a invalid chart-formating. I have attached some printscreen and sourcecode in word-file.

Can you give me the answer why aspose.cells do not get exactly the same formatting as excel do?

Thank you for your help.

Greetings,
Dave

Hi Dave,

Please try the attached hotfix version

I used this version with your template file "TEST_Kalkulation.xls" and the output image file (attached) is fine. Following is my sample code:

Workbook workbook = new Workbook();
workbook.Open("d:\\test\\TEST_Kalkulation.xls");
Aspose.Cells.Chart chart = workbook.Worksheets[0].Charts[0];
System.Drawing.Bitmap img = chart.ToImage();
img.Save("d:\\test\\chartimage.jpg");

Thank you.

Hi Dave,

Please try this fix.We fixed some bugs in this fix.