Open Nanagoud007 opened 2 weeks ago
Hi @Nanagoud007,
We would like to inform you that when setting toggleSeriesVisibility to false in the Legend and tap on the Legend, the onLegendTapped callback will not be triggered. The toggleSeriesVisibility indicates that legend item should be interactive or not, when it is set to false, the onLegendTapped callback will not get triggered and this is the default behaviour. You can achieve your requirement by using the GestureDetector widget in the legendItemBuilder property for the Legend. By doing this, you can get interaction details from the GestureDetector widget in onTap callback when tapping on the Legend. We have shared a user guide documentation link for your reference below. Please let us know if you have any further needs.
UG Link, https://help.syncfusion.com/flutter/circular-charts/legend#legend-item-template
Regards, Lokesh P.
Bug description
i am rendering pie chart with legend on click on that it has to trigger the functionality but it is not happening here is the code snippet
Steps to reproduce
run the code snippet to produce
Code sample
Code sample
```dart Widget _pie_chart() { return Expanded( child: OverView2Function().isPiechartLoading.value ? Padding( padding: const EdgeInsets.all(8.0), child: Container( height: 300, child: Center( child: CircularProgressIndicator(), ), ), ) : OverView2Function().connectorStatus.isNotEmpty ? SfCircularChart( // tooltipBehavior: _tooltipBehavior, title: ChartTitle( text: 'Connector Status', alignment: ChartAlignment.center, ), legend: Legend( isVisible: true, textStyle: TextStyle( decoration: TextDecoration.underline, color: Colors.blue[900]), toggleSeriesVisibility: false), onLegendTapped: (LegendTapArgs legendTapArgs) { AppUtil.printData(legendTapArgs.pointIndex.toString(), isError: true); final int? index = legendTapArgs.pointIndex; final ConnectorStatusModel selectedStatus = OverView2Function().connectorStatus[index!]; OverView2Function().getConnectorListByStatus(status: selectedStatus.status!); GoRouter.of(AppUtil.context!).go(MyRoutes.connector_list_by_status + '?status=${selectedStatus.status}'); }, // ignore: strict_raw_type series:Screenshots or Video
Screenshots / Video demonstration
[Upload media here]Stack Traces
Stack Traces
```dart [Add the Stack Traces here] ```On which target platforms have you observed this bug?
Web
Flutter Doctor output
Doctor output
```console [Add your output here] ```