All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

SankeyDiagramControl.LoadFromFile(String) Method

Restores the diagram's layout from an XML file.

Namespace: DevExpress.XtraCharts.Sankey

Assembly: DevExpress.XtraCharts.v20.2.UI.dll

Declaration

public void LoadFromFile(
    string path
)
Public Sub LoadFromFile(
    path As String
)

Parameters

Name Type Description
path String

Specifies the path to the file that contains the layout.

Remarks

Use the LoadFromFile method to load a diagram's layout from an XML file. If this file does not exist, a System.IO.FileNotFoundException exception is raised. The resulting file does not contain information about a diagram source's data - you should to specify the control's DataSource property after the LoadFromFile method is called.

private void Form1_Load(object sender, EventArgs e) {
    sankeyDiagramControl1.LoadFromFile("D:\\diagram1.xml");
    sankeyDiagramControl1.DataSource = GetSankeyItems();
}

To save a layout a file, call the ChartControl.SaveToFile method.

See Also