Back to Devexpress

SankeyDiagramControl.SaveToFile(String) Method

windowsforms-devexpress-dot-xtracharts-dot-sankey-dot-sankeydiagramcontrol-dot-savetofile-x28-system-dot-string-x29.md

latest2.0 KB
Original Source

SankeyDiagramControl.SaveToFile(String) Method

SECURITY-RELATED CONSIDERATIONS

Using file paths sourced from untrusted input may expose unauthorized files or allow unintended file access. Always validate and normalize all external paths to prevent path manipulation.

Saves the diagram’s layout to an XML file.

Namespace : DevExpress.XtraCharts.Sankey

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

NuGet Package : DevExpress.Win.Charts

Declaration

csharp
public void SaveToFile(
    string path
)
vb
Public Sub SaveToFile(
    path As String
)

Parameters

NameTypeDescription
pathString

A path to a file that stores the layout. If an empty string is specified, an exception is raised.

|

Remarks

The SaveToFile method saves the diagram’s layout to an XML file. You can use the ChartControl.LoadFromFile method to restore the saved layout.

csharp
private void Form1_Load(object sender, EventArgs e) {
    sankeyDiagramControl1.SaveToFile("D:\\diagram.xml");
}
vb
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
    sankeyDiagramControl1.SaveToFile("D:\diagram.xml")
End Sub

See Also

SankeyDiagramControl Class

SankeyDiagramControl Members

DevExpress.XtraCharts.Sankey Namespace