[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ISparkline.FromJson

FromJson Method

FromJson(string)

Generates the sparkline from the JSON string.

Use this method to restore a sparkline from a JSON string created by ToJson().

Declaration
void FromJson(string json)
Sub FromJson(json As String)
Parameters
Type Name Description
string json

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();
sparkline.FromJson(json);