4.2.0.0 -- ToImage() looks nothing like my chart

Hi Todd,

The attachment is the lasted result. Does this meet your requriements? If this is okay, we will release a new version.

Thank you!

Please try the attached fix

Thanks Roger. The development team is testing with this latest version and is very satisfied with the results. We appreciate the quick turn-around!

Todd

Hi Roger.

Ok, the development and QA teams have noticed one issue. When the PowerPoint is dispalyed in "Slide Show" mode, the chart images are noticibly fuzzy. We have made sure the chart objects are sized to 100% so as not to introduce additional image distortion -- and the images do look good and crisp when displayed in the "Normal" view, but as soon as you switch to "Slide Show" you can see the fuzzy images:

I have attached a screen-shot which shows this:

Hi Roger.

After a little more investigation, we believe the root-cause for the fuzzy image is that Chart.ToImage() only returns a Bitmap:

Public Function ToImage() As Bitmap

When Excel renders the chart image natively, it creates the chart image as a .EMF (Enhanced Metafile) format. .EMF is a Vector image format which scales very nicely.

Would it be feasible to have Chart.ToImage() return a vector format like EMF, or WMF, or SVG?

Todd

toddba:

Hi Roger.

Ok, the development and QA teams have noticed one issue. When the PowerPoint is dispalyed in "Slide Show" mode, the chart images are noticibly fuzzy. We have made sure the chart objects are sized to 100% so as not to introduce additional image distortion -- and the images do look good and crisp when displayed in the "Normal" view, but as soon as you switch to "Slide Show" you can see the fuzzy images:

I have attached a screen-shot which shows this:

Hi todd,

Yes, you are right. We will look into it and next week provide a method for creating chart image as .emf format.

Hi Roger,

Thanks!!! I really look forward to see what you guys are able to come up with.

Todd

Hi Todd,

Please try the attached fix

Roger,

You guys never cease to amaze me. What an incredibly great job! I am so impressed by the quality of the chart output now. It's super crisp, and the charts looks really look top-notch.

The development team is running this new version of the library through all of their tests right now to make sure there aren't any adverse artifacts. We'll let you know what we find.

Thanks again!

Todd

roger:

Hi Todd,

Please try the attached fix

As Todd said, we are very happy with the new version of cells. Here is a prioritized list of some things I have observed while testing the latest version of Aspose.Cells. I have attached a modified version of Todd’s test app to demonstrate these.

  • DataLabels.Text is not written to the output image:
    See slide #3. In the test code I set the DataLabel.Test property to some override values. These values are not showing up on the final output. The chart is as expected when rendered by excel. Note: this is currently our biggest road block, If we can get a fix for this problem soon (within a week or so) we will be able to use Aspose in our production environment without the assistance of PowerPoint automation.
  • DataLabels Font is not honored:
    I’ve edited the chart to add a custom font color to the label on the 1st data point of the chart. When the test code uses Chart.ToImage() I would expect the text for that datapoint to be red but it’s not. Additionally in the test code I set the DataLabel.TextFont.Color property to Red. These values are not Red on the final output. Again, the chart is rendered as expected by excel.
  • LeaderLines are not honored:
    If you look at the pie chart on slide #2 (in.ppt) you will see that the chart is configured to have leader lines from the chart section to the datalable. In the Chart.ToImage() version of the chart (out.ppt) the leader lines are not present.
  • Shift in scale:
    The charts in the in.ppt file are scaled to 100% height and width. When the charts are rendered using the Chart.ToImage() method the original size of the chart is changed and a new scale is used to compensate for the new size. The resulting scale seems to be 75% in width and height. The resulting size of the chart is not consistent with the original. It is quite noticeable if the chart is opened in the resulting presentation via the Chart Object | Open context menu.
  • Category Series Labels do not format wrapped lines as does Excel:
    The Aspose rendering seems to be right justified and the Excel rendering seems to be centered.
  • NSeries.Overlap does not work as expected:
    If the NSeries.Overlap value is set to 0 on a bar chart the bars should be flush to the bars of an adjacent series. This is not working properly. The gap looks more like -10 (my guess).

Just to reiterate. We are very happy with the progress made to date and hope that we can get a fix for at least the first few items listed here soon.

Thanks,

John

Hi Jhon,

  • DataLabels.Text and DataLabels Font

Now we are not support setting customed data labels. We will implement it as soon as possible.

  • LeaderLines

Not supported. This issue is complex and we have not a recent plan to implement it.

  • Shift in scale

What chart have this problem? All? I did not compare out.

  • Category Series Labels

In excel The first line of Labels is right justified, yet, the second is centered. I did not found a good solution to fix it. All labels are to coordinate axis alignment.

  • NSeries.Overlap

I did not figure out the issue what you say. I think Aspose work finely. The attachment is my testing for overlap.

Roger,

When you say you are not supporting DataLabel changes and LeaderLines, can you give me some idea what the time frame this for is? I have a code freeze deadline on the 30th of this month and I would like to set expectations with our business users.

Shift in scale is on all charts in the out.ppt file. You must compare the in and the out to see how Aspose is changing the chart.

For the Category Series Labels it is mostly an observation, but you are up against the reality that if a user opens a chart in Excel they will see that the rendering is different.

NSeries.Overlap, the problem is simple. If the overlap value is set to 0, then the bars of adjacent series should be flush to each other. if is it 10 they should overlap slightly and if it is -10 they should be slightly apart. This is not how Aspose is rendering the charts.

Thanks,

John

Hi John,

Next week we will provide a fix to you for Datalabels and LeaderLines. The other issues I have not fully understood and need to spend time looking into them.

Roger,

This is awesome. I'm looking forward to seeing what you guys come up with.

-John

Hi Roger. I was just following up on this thread for John, who is on vacation for the 2 weeks. Any news on the latest version? We're getting close to code-freeze for our December release.

Thanks,
Todd

roger:

Hi John,

Next week we will provide a fix to you for Datalabels and LeaderLines. The other issues I have not fully understood and need to spend time looking into them.

Hi Todd,

We are still working to solve the problem for DataLables and LeaderLines. It's very complex to convert the leaderlines correctly. We will try our best to make it before the end of next week.

Thanks Laurence!

For what it's worth, the leader lines are proably the lowest priority for us among the issues that John reported. I can certainly understand the complication with them, as even MS Graph and Excel don't seem to handle them correctly in 100% of the situations.

Thanks for the update.

Todd

Laurence:

Hi Todd,

We are still working to solve the problem for DataLables and LeaderLines. It's very complex to convert the leaderlines correctly. We will try our best to make it before the end of next week.

Hi,

Please try the attached fix.

We have fixed all bugs except LeaderLines and Category Series Labels issue. Those two issues are too complex. We will consider how to improve it in the future versions.

Thanks Roger! We have downloaded this new version and are starting to test it.

Todd