The following example demonstrates how to save a chart to a memory stream, and then restore it.
using System.IO;
// ...
Stream stream = new MemoryStream();
// ...
// Save the chart.
stream.Seek(0, System.IO.SeekOrigin.Begin);
chartControl1.SaveToStream(stream);
// Load the chart.
stream.Seek(0, System.IO.SeekOrigin.Begin);
chartControl1.LoadFromStream(stream);
Imports System.IO
' ...
Dim stream As System.IO.Stream
stream = New System.IO.MemoryStream()
' ...
' Save the chart.
stream.Seek(0, System.IO.SeekOrigin.Begin)
ChartControl1.SaveToStream(stream)
' Load the chart.
stream.Seek(0, System.IO.SeekOrigin.Begin)
ChartControl1.LoadFromStream(stream)