Loading and Saving to a String

In addition to loading and saving to an XML file, the chart has the ability to save to a string value. This string can then be saved in an application and retrieved at a future time.

C1Chart provides four methods for loading and saving chart to a string: SaveChartToString, LoadChartFromString, SaveChartAndImagesToString, and LoadChartAndImagesFromString.

The SaveChartToString and LoadChartFromString methods enable you to save a copy of the chart to a string value in the application. This string value contains all the set properties, methods, and events for the chart, in essence, its formatting. The chart can save to this file, and then if the structure remains intact, load a chart from this file.  

The SaveChartAndImagesToString and LoadChartAndImagesFromString methods does the same as the SaveChartToString and LoadChartFromString methods except that they capture the various background images of the chart elements (chart, header, footer, labels).To save the chart to a string at run time, call the SaveChartToString method, this takes no parameters and returns the string value:

      Visual Basic

      C#

To load the chart from a string value at run time, call the LoadChartFromString method, which takes the saved chart string as its only parameter:

      Visual Basic

      C#


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