To save synchronously to a Nevron Binary Chart local file call the SaveToLocalFile method of the chart view. This method doesn't work on sandboxed platforms like Blazor WebAssembly.
Save to a Nevron Binary Chart file synchronously |
Copy Code
|
---|---|
chartView.SaveToLocalFile(@"D:\Documents\MyChart.ncb");
|
To save a chart to a file asynchronously call the SaveToFileAsync method of the chart view. Calling this method shows a loader over the chart view until the saving completes. The method returns a promise, which you can use to get notified when the saving completes.
Save to a Nevron Binary Chart file asynchronously |
Copy Code
|
---|---|
chartView.SaveToFileAsync(@"D:\Documents\MyChart.ncb").Then( delegate (bool success) { }, delegate (Exception ex) { } ); |
To save a chart to a stream call the SaveToStream method of the chart view and pass the chart format to save to:
Save to Nevron Binary Chart stream |
Copy Code
|
---|---|
chartView.SaveToStream(stream, NChartFormat.NevronBinary); |