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 the example requires a form, a button named Button1 on the form, two ChartBox components, and two UiChart components used as data sources (UiChart1 for ChartBox1 and UiChart2 for ChartBox2). To execute the example, add links 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 the Button1 button, settings are loaded from the chart displayed in ChartBox1.
Executing the example requires a form, a button named button1 on the form, two ChartBoxNet components, and two UiChartNet components used as data sources (uiChartNet1 for ChartBoxNet1 and uiChartNet2 for ChartBoxNet2). To execute the example, add links to the 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 the Button1 button, settings are loaded from the chart displayed in ChartBox1.
See also: