Saving Chart Images

The C1Chart provides the ability to create a single image of the entire chart as it is drawn on the screen or printer.  By calling the SaveImage method, all of the items within the chart bounds can be saved to the clipboard, a byte array, a stream, or to an image file. 

The SaveImage method can save to four different output types by using one of eight different overloaded parameter sets. For each output type, there is an option to save the chart image as it appears on the screen, or to save the chart image as a specified size. 

To save the chart image to the clipboard, simply specify an image format, the size parameter is not specified here:

      Visual Basic

      C#

To save the chart image to an image file, simply specify the pathname for the new image and an image format, the size parameter is not specified here:

      Visual Basic

      C#

To save the chart image to a stream, simply specify the stream object and an image format, the size parameter is not specified here:

      Visual Basic

      C#

To save the chart image as a byte array, simply specify the byte array, and an image format, the size parameter is not specified here:

      Visual Basic

      C#


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.