Click or drag to resize

ChartExtensionsConvertToImageStream Method

Saves the chart to a memory stream using the given image format and returns the stream, ready for reading.

Namespace: GSF.Windows.Forms
Assembly: GSF.Windows (in GSF.Windows.dll) Version: 2.4.207-beta
Syntax
public static Stream ConvertToImageStream(
	this Chart chart,
	ChartImageFormat format = ChartImageFormat.Png
)
View Source

Parameters

chart  Chart
The chart to be saved to the stream.
format  ChartImageFormat  (Optional)
The format to used to save the image.

Return Value

Stream
The stream containing the chart as an image.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Chart. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also