ComponentOne Chart for WPF and Silverlight
Chart for WPF and Silverlight / Chart Features / Saving and Exporting C1Chart / Saving C1Chart as a .Png File
In This Topic
    Saving C1Chart as a .Png File
    In This Topic

    To save C1Chart as a .Png file, use the following code:

    Visual Basic
    Copy Code
    ' save image to file
    Using stm = System.IO.File.Create("chart.png")
        c1Chart1.SaveImage(stm, C1.WPF.C1Chart.Extended.ImageFormat.Png)
    End Using
    

     

    C#
    Copy Code
    // save image to file   
          using (var stm = System.IO.File.Create("chart.png"))
          {
            c1Chart1.SaveImage(stm, C1.WPF.C1Chart.Extended.ImageFormat.Png);
          }
    

     

    See Also