Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
270
Export Legend with Chart to Image
posted

Hi,

How do we export the Legend associated to a chart to a Jpg/Png?

Since the legend is a separate control it does not export the chart using the "SaveAs" method.

Regards,

Naresh

 

  • 965
    Offline posted

    This worked for me.

    http://es.infragistics.com/community/forums/t/108462.aspx

  • 1225
    Offline posted

    Hi Naresh,
    If you are trying to save the chart along with the legend, the SaveTo method can be used to save the chart’s image to a file or to a stream.
    The code is as,
    this.ultraChart1.SaveTo("chart.jpeg", System.Drawing.Imaging.ImageFormat.Jpeg);

    You can also refer to this link from our documentation, http://es.infragistics.com/help/winforms/chart-save-a-chart-image

    Thanks,
    Josheela