[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ISparkline.ToJson

ToJson Method

ToJson()

Generates a JSON string from the sparkline.

Use this method to serialize the current sparkline so it can be passed to FromJson(string) to restore the sparkline configuration.

Declaration
string ToJson()
Function ToJson() As String
Returns
Type Description
string

The JSON string representing the sparkline.

Examples
worksheet.Range["A1:C1"].Value = new object[] {1, 3, 2};
ISparklineGroup group = worksheet.Range["D1"].SparklineGroups.Add(SparkType.Line, "A1:C1");
ISparkline sparkline = group[0];
string json = sparkline.ToJson();