OnExportEventNotTriggering

The onexport event is not triggering, the framework is .net 6 and im using the latest version of syncfusion blazor

<SfChart @ref="chartInstance">
<ChartEvents OnExportComplete="ExportCompleteEvent"></ChartEvents>
<ChartPrimaryXAxis ValueType="ValueType.DateTime" EdgeLabelPlacement="EdgeLabelPlacement.Shift">
<ChartAxisMajorGridLines Width="0"></ChartAxisMajorGridLines>
<ChartAxisMajorTickLines Width="0"></ChartAxisMajorTickLines>
<ChartAxisLabelStyle Size="11px"></ChartAxisLabelStyle>
</ChartPrimaryXAxis>
<ChartPrimaryYAxis LabelFormat="{value} L">
<ChartAxisLineStyle Width="0"></ChartAxisLineStyle>
<ChartAxisMajorTickLines Width="0"></ChartAxisMajorTickLines>
<ChartAxisLabelStyle Size="11px"></ChartAxisLabelStyle>
<ChartAxisTitleStyle Size="13px"></ChartAxisTitleStyle>
</ChartPrimaryYAxis>
<ChartAxes>
<ChartAxis Name="Kilometraje" OpposedPosition="true"/>
<ChartAxis Name="Velocidad" OpposedPosition="true" PlotOffsetTop="300"/>
</ChartAxes>
<ChartTooltipSettings Enable="true" Shared="true" EnableMarker="false"></ChartTooltipSettings>
<ChartSeriesCollection>
<ChartSeries DataSource="@_fuel.Points" XName="@nameof(PointTimeValue.Time)" YName="@nameof(PointTimeValue.Value)" Type="ChartSeriesType.Area" Fill="lightskyblue" Opacity="0.5">
</ChartSeries>
<ChartSeries DataSource="@_mileage.Points" XName="@nameof(PointTimeValue.Time)" YName="@nameof(PointTimeValue.Value)" Type="ChartSeriesType.Line" Fill="black" YAxisName="Kilometraje">
</ChartSeries>
<ChartSeries DataSource="@_speed.Points" XName="@nameof(PointTimeValue.Time)" YName="@nameof(PointTimeValue.Value)" Type="ChartSeriesType.Line" Fill="green" YAxisName="Velocidad">
</ChartSeries>
</ChartSeriesCollection>
</SfChart>

private async
Task PrintChart(MouseEventArgs args)
{
await chartInstance.ExportAsync(ExportType.PDF, "Charts", PdfPageOrientation.Landscape, false);
//await chartInstance.PrintAsync(Element); TRIGGERING
}

private void ExportCompleteEvent(ExportEventArgs args)
{
// Here, you can customize your code. NOT TRIGGERING
}

2 Replies 1 reply marked as answer

GV Gopalakrishnan Veeraraghavan Syncfusion Team May 9, 2023 04:14 PM UTC

Hi Jose,


We have considered your reported scenario as bug and logged a defect report for this issue. This fix will be available in our weekly patch release which is scheduled to be rolled out on 16th May 2023. We appreciate your patience until then. You can keep track of the bug from the below feedback link.


Feedback Link :  https://www.syncfusion.com/feedback/43540/onexportcomplete-event-is-not-triggered-when-exporting-the-chart


If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.



Regards,

Gopalakrishnan Veeraraghavan



GV Gopalakrishnan Veeraraghavan Syncfusion Team May 12, 2023 01:26 PM UTC

Hi Jose,


We have fixed the issue of the OnExport event not triggering in the sample level. By default, if the data loaded from the client to the server exceeds 32KB, a server reconnect issue occurs which prevents the OnExport event from triggering when exporting the chart in Blazor. To overcome this issue, increase the message size in the Program.cs file. Add the following service to increase the message size in the Program.cs file. We have attached a sample for your reference. Please check with the below code snippet.



builder.Services.AddServerSideBlazor().AddHubOptions(o =>

{

    o.MaximumReceiveMessageSize = 102400000;

});


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/OnExportEventNotTriggerFix-94002008.zip


Kindly revert us if you have any concerns.


Regards,

Gopalakrishnan Veeraraghavan


Marked as answer
Loader.
Up arrow icon