Skip to main content
All docs
V24.1

SankeyDiagramControl.LoadFromFile(String) Method

Restores the diagram’s layout from an XML file.

Namespace: DevExpress.XtraCharts.Sankey

Assembly: DevExpress.XtraCharts.v24.1.UI.dll

NuGet Package: DevExpress.Win.Charts

Declaration

public void LoadFromFile(
    string path
)

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