LoadFromJSON(JSON: String);
LoadFromJSON(JSON: String);
JSON. The string from which JSON markup is loaded.
The LoadFromJSON method loads JSON markup from a string variable.
Executing this example requires a form, a button named Button1 positioned in this form, two ChartBox components, and two UiChart components used as data sources (UiChart1 for ChartBox1 and UiChart2 for ChartBox2). To execute this example add references to the Chart system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
str: String;
Begin
str := ChartBox1.Source.GetChart.SaveToJSON;
uiChart2.Chart.LoadFromJSON(str);
End Sub Button1OnClick;
Change format settings for the first chart. After clicking Button1, settings are loaded from the chart shown in ChartBox1.
Executing this example requires a form, a button named button1 positioned in this form, two ChartBoxNet components, and two UiChartNet components used as data sources (uiChartNet1 for ChartBoxNet1 and uiChartNet2 for ChartBoxNet2). To execute this example add references to Chart system assemblies.
Imports Prognoz.Platform.Interop.Chart;
...
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
str: String;
Begin
str := ChartBoxNet1.Source.GetChart().SaveToJSON();
uiChartNet2.ChartUi.Chart.LoadFromJSON(str);
End Sub;
Change format settings for the first chart. After clicking Button1, settings are loaded from the chart shown in ChartBox1.
See also: