4.2.0.0 -- ToImage() looks nothing like my chart

We've been waiting for the ToImage() functionality in order to finish a proof-of-concept which was intended to prove whether or not Aspose was a viable replacement for our current solution (which utilizes PowerPoint Automation). However, we are having some problems still...

The bitmap produced by calling the new ToImage() method looks nothing at all like my chart. I have a fairly simple bar chart that has gradient fills, and text labels on the bars, but much of the formatting is not present in the chart image. Specifically...

Problems:

  • Vertical Axis: labels are truncated (can't see the full text)
  • Horizontal Axis: labels do not wrap
  • Bar Colors: Bars have no color, instead of gradient fills.
  • Bar Labels: The labels on the bars are showing up horizontally instead of vertically.

Please see the attached project. There is an IN.PPT and OUT.PPT which shows the differece. There is also a OUT.BMP which shows what the bitmap looks like.

Todd

Hi Todd,

1, It is fixed now.

2, We are tring to wrap the labels.

3, We do not support the FillFormat in the Charts.ToImage() method.We are looking into this feature.

4,It is fixed now.

If we fix the problem 2, we will attach the fix to you.Thanks for your patience.

Warren:

Hi Todd,

1, It is fixed now.

2, We are tring to wrap the labels.

3, We do not support the FillFormat in the Charts.ToImage() method.We are looking into this feature.

4,It is fixed now.

If we fix the problem 2, we will attach the fix to you.Thanks for your patience.

Thanks Warren. I sincerely appreciate the great work you guys are doing. But unfortunately the FillFormat is a real show-stopper for us. :-(

We are producing client-facing documents, and the design must match (exactly) what our Graphic Design Agency has provided to us as far as sizes, colors, gradient fills, fonts, etc.

Is this something that you think will be coming in the near future? I would appreciate your candor, because if this feature is difficult to implement and will not be ready for several more months then we will have to try to find an alternative solution.

Thanks,

Todd

Hey Warren,

What do you mean by “It is fixed now.”? There is no new hot fix. How do we get these changes? Thanks.

Matt

Hi Matt,

For Todd

Problems:

  • Vertical Axis: labels are truncated (can't see the full text) ...fixed.
  • Horizontal Axis: labels do not wrap ....not completely fixed yet.
  • Bar Colors: Bars have no color, instead of gradient fills.... not available yet.
  • Bar Labels: The labels on the bars are showing up horizontally instead of vertically......fixed.

We do mean that after fixing label's wrapping we will attach the fix here for Todd.

For you.,

Well, we did fix some of your issues related font and legend position. And after resolving the line issue which is appearing in the middle of the chart, we will attach a fix @ <A href="</A> for you.</P> <P>We will try to resolve these issues ASAP. It may take a few days. </P> <P>Thank you.</P>

Hi Todd,

We are looking into gradient fills and it will take us a month to do it. If it is ok, we will attach the fix to you. Thanks for your patience.

Warren:

Hi Todd,

We are looking into gradient fills and it will take us a month to do it. If it is ok, we will attach the fix to you. Thanks for your patience.

We are scheduled to start development on 5/1, so it sounds like we'll have to continue to use PowerPoint automation for the short term. However, once the functionality becomes available we will definitely want to rewrite our code to use Aspose.Cells and Aspose.Slides.

Thanks,

Todd

Warren:

Hi Todd,

We are looking into gradient fills and it will take us a month to do it. If it is ok, we will attach the fix to you. Thanks for your patience.

Hi Warren. Just checking on the status of this. If the gradient fills are ready for testing soon, we still might be able to utilize Aspose for our current project instead of Microsoft Office Automation.

Thanks,

Todd

Hi Todd,

We will update you soon.

Thank you.

Hi Todd,

We are still working on this feature. Hopefully we can make it in the next week.

Great! Thank you. :slight_smile:

Please try this attached version. It’s available now.

Thank you Laurence. We are definitely getting closer. I just wanted to point out a few bugs though...

1. The labels on my charts y-axis are getting dropped.

2. The gradient for the Image is actually the opposite of the original chart. In the original chart, the fill is light (lower left) to dark (upper right). The bitmap produced by ChartToImage has the gradient going from dark (lower left) to light (upper right).

3. The color in the bitmap produced by ChartToImage seems to be much more saturated than the original chart image. The "alpha" channel appears to be too dark.

Attached is my sample project. Please compare the "in.ppt" to the "out.ppt" to see the differences.

Thanks!

Todd

Hi Todd,

Thank you for your report.

We will check and enhance it soon.

Thank you.

Hi Todd,

Please try this attached version.

Hi Todd,

1,2 have been fixed. We are still looking into the third problem.

Excellent work guys! Things are looking really good. I forgot to mention one other very small, but noticible problem. There appears to be an additional 1 or 2 pixels between the bars, as compared to when Excel renders the chart image. I've attached two jpegs to illustrate.

Thanks!

Todd

Hi Todd,

It is difference between PPT display image and MS Excel display image. If you double click the image in the PPT, you will see the image created by MS Excel.We work as MS Excel.

If you want to get the same image as PPT dispaly image with Excel, you should chanage the value of "overlap" of the second series to 1 not the default 0.With Aspose.Cells, you can change it by the following code: chart.NSeries[1].Overlap = 1;

Hi Warren.

I tried your suggestion. I had to set wb.Worksheets[0].Charts[0].NSeries[0].Overlap = 3; in order to get the aspose-rendered chart to look the same way as how Excel renders the same chart (when Excel has the overlap set to 0).

Here is my concern. The rendered image produced by Aspose must look exactly like the image produced by Excel. The reason for this is because if one of our users opens a PPT, then double-clicks on the chart to edit it -- the image will be re-rendered by Excel instead of Apose. This will result in a chart that looks different than all of the rest of them in the Presentation.

I know it probably seems like we are being nitpicky over a couple of extra pixels, and the color depth. However, it is imperative that the charts look exactly like they would like if they were rendered by Excel.

Thanks! Todd

Warren:

Hi Todd,

It is difference between PPT display image and MS Excel display image. If you double click the image in the PPT, you will see the image created by MS Excel.We work as MS Excel.

If you want to get the same image as PPT dispaly image with Excel, you should chanage the value of "overlap" of the second series to 1 not the default 0.With Aspose.Cells, you can change it by the following code: chart.NSeries[1].Overlap = 1;

Ok. Got another issue. Moving right along, we are now trying to manipulate a Pie chart, get its image, and put it back into the PowerPoint deck. When we call ToImage() on the Pie chart, we get an exception out of Aspose.

Sample project is attached.

Todd