Hi
Praveen,
You
can achieve your requirement by setting the IsBase64 parameter to true
when calling the ExportAsync method. This will convert the stock chart
into a Base64 string, which will be available in the ExportCompleted
event argument. Please refer to the snippet and sample below for more details.
|
<SfButton
OnClick="ExportChart" Content="DataUrl" IsPrimary="true"></SfButton>
<SfStockChart
@ref="@chartInstance" Title="AAPL Stock Price">
<StockChartEvents ExportCompleted="ExportComplete"></StockChartEvents>
</SfStockChart>
@code
{
private SfStockChart chartInstance;
public async Task ExportChart(MouseEventArgs args)
{
await chartInstance.ExportAsync(ExportType.PNG, "StockChart", null,
false, true);
}
public void ExportComplete(ExportEventArgs exportEventArgs)
{
string base64 = exportEventArgs.Base64;
}
}
|
Sample
: https://www.syncfusion.com/downloads/support/directtrac/general/ze/StockBase64-920600973.zip
Kindly
revert us if you have any concerns.
Regards,
Durga
Gopalakrishnan.