Chart does not appear on doc

Last post 09-20-2010, 12:54 AM by aske012. 12 replies.
Sort Posts: Previous Next
  •  09-13-2010, 9:17 PM 258447

    Chart does not appear on doc .NET

    Hi, my chart does not appear on the doc after I update to Aspose.Word 9.4.0.

    I am using Microsoft Chart and it was fine with previous version. Not sure about 9.3.0 though.
    Because I did not test the chart portion after update to 9.3.0
    Note that I am using MS Word 2003.
    Below is the code snippet on how I insert the chart onto the doc.
    ----------------------------------------------------------------------------------------------------------------
    c = new Chart();
    ca = new ChartArea();
    c.ChartAreas.Add(ca);
    MemoryStream ms = new MemoryStream();
    c.SaveImage(ms, ImageFormat.Emf);

    builder.InsertImage(ms, Aspose.Words.Drawing.RelativeHorizontalPosition.Default, Convert.ToDouble(100),
                                    Aspose.Words.Drawing.RelativeVerticalPosition.TopMargin, Convert.ToDouble(100),
                                    Convert.ToDouble(600), Convert.ToDouble(400), Aspose.Words.Drawing.WrapType.None);
    ---------------------------------------------------------------------------
    Please help and advice.

    Thanks!
     
  •  09-14-2010, 12:02 AM 258455 in reply to 258447

    Re: Chart does not appear on doc

    Hi Luke,

    Thanks for your inquiry.

    I cannot reproduce the issue using the latest version of Aspose.Words (9.4) and Aspose.Report (2.7). Could you please create a test project which allows me to reproduce the issue on my side.

    Thanks,


    Adam Skelton
    Programming Writer
    Aspose Auckland Team
     
  •  09-14-2010, 1:00 AM 258461 in reply to 258455

    Re: Chart does not appear on doc

    Hi Adam, 

    Note that I am using Microsoft Chart. 
    using System.Windows.Forms.DataVisualization.Charting;
    using System.Windows.Forms.DataVisualization.Charting.Utilities;

    I am NOT using Aspose.Report.

    Can you try with MS Chart?

    Thanks,
    luke
     
  •  09-14-2010, 3:05 AM 258479 in reply to 258461

    Re: Chart does not appear on doc

    Hi Luke,

    I was unable to reproduce any issue using Microsoft.Charts either. Are you able to post your full code and output document here for testing? I used the .NET Framework 3.5 with the additional Microsoft Chart Control DLL.

    Also note, please ensure you are using a chart that has some content as by default the chart will be plain white and will look as if it is not appearing against the white background of a Word document.

    Thanks,


    Adam Skelton
    Programming Writer
    Aspose Auckland Team
     
  •  09-14-2010, 3:45 AM 258487 in reply to 258479

    Re: Chart does not appear on doc

    Yes, previously was working with Aspose.Words below 9.3.0.
    Anyway, I will extract out some part of my code and send to you for checking.
    Give me sometime to extract out some code from my project.

    Thanks,
    luke
     
  •  09-14-2010, 4:31 AM 258494 in reply to 258487

    Re: Chart does not appear on doc

    Hi Adam, I have emailed you my code.

    Thanks,
    luke
     
  •  09-14-2010, 6:09 AM 258499 in reply to 258494

    Re: Chart does not appear on doc

    Hi Luke,

    Thanks for sending me your project.

    I was able to reproduce the issue on my side, however it seems, there is something going wrong with the Chart control itself and not anything with Aspose.Words. Saving your chart to an image on the disk also results in a near blank image.

    I was able to create a small chart and insert it properly into a new Document using the same method as you are using. As you said you haven't tested the chart side of your application for a while, so most likely you have changed some of the code used to produce the chart and have not tested these changes until now. I think you will need to do a bit of inspection to find the cause of this problem.

    If you have any further inquires, please feel free to ask.

    Thanks,


    Adam Skelton
    Programming Writer
    Aspose Auckland Team
     
  •  09-14-2010, 9:15 PM 258617 in reply to 258499

    Re: Chart does not appear on doc .NET

    Hi Adam,

    I did not have this problem when using Aspose.Words 9.2 previously.
    I have not tested on 9.3 as your 9.4 came out quite fast.
    And no code has been change for the charting portion;
    the only codes changed on my side is to cater for your 9.3 changes.

    Please help to look thru again; while I check on the MS Chart itself.


    Thanks,
    luke
     
  •  09-14-2010, 9:25 PM 258618 in reply to 258617

    Re: Chart does not appear on doc

    Hi Luke,

    I have tried testing with Aspose.Words 9.4 and Aspose.Words 9.2 but encountered the issue in both versions. Please test your sample project using the DLLs from both versions and provide feedback about what happens.

    Thanks,


    Adam Skelton
    Programming Writer
    Aspose Auckland Team
     
  •  09-15-2010, 3:06 AM 258659 in reply to 258618

    Re: Chart does not appear on doc

    I see.

    Ok let me try it next Monday.
    Currently I am out of office.

    Thanks.
     
  •  09-15-2010, 4:44 PM 258843 in reply to 258659

    Re: Chart does not appear on doc

    Hi Luke,

    Sure, I'll keep my eye on this thread.

    Thanks,


    Adam Skelton
    Programming Writer
    Aspose Auckland Team
     
  •  09-19-2010, 11:03 PM 259445 in reply to 258843

    Re: Chart does not appear on doc

    Hi Adam, 

    Sorry for the trouble; 
    There is a problem with the data binding part on the chart code I passed to you.

    I have fixed the data portion on my actual code and now the chart is working fine.

    Thanks,
    luke
     
  •  09-20-2010, 12:54 AM 259461 in reply to 259445

    Re: Chart does not appear on doc

    Hi Luke,

    It's all good, I'm glad you have found the solution to your problem.

    If you need any help, please feel free to ask.

    Thanks,


    Adam Skelton
    Programming Writer
    Aspose Auckland Team
     
View as RSS news feed in XML