Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[syncfusion_flutter_charts] Trackball behaviour issue #1791

Open
DhavalRKansara opened this issue Apr 9, 2024 · 2 comments
Open

[syncfusion_flutter_charts] Trackball behaviour issue #1791

DhavalRKansara opened this issue Apr 9, 2024 · 2 comments
Labels
bug Something isn't working charts Charts component framework issue Something isn't working which depends framework waiting for customer response Cannot make further progress until the customer responds.

Comments

@DhavalRKansara
Copy link

DhavalRKansara commented Apr 9, 2024

Hello team,

While implementing syncfusion_flutter_charts I need to add trackball on the graph, where trackball will be visible only when user traverses through the graph points. Along with trackball, I need to show a shadow effect behind it and for the same, I have used the border radius and border color as shown in the below code.

I am using syncfusion_flutter_charts: 22.2.12. I tried with syncfusion_flutter_charts latest version 25.1.38, but with the same event trackBall is not coming.

Issue: I need to show a shadow effect around trackball, but there was some weird behaviour while traversing from one point index to another, as you can see in the below-attached video.

Code:

SfCartesianChart(
   plotAreaBorderWidth: 0,
   primaryXAxis: DateTimeAxis(
     isVisible: false,
     dateFormat: defaultDateFormat,
   ),
   primaryYAxis: NumericAxis(
     isVisible: false,
   ),
   onTrackballPositionChanging: (trackballArgs) {
     if (currentDataPointIndex !=
         trackballArgs.chartPointInfo.dataPointIndex) {
       currentDataPointIndex =
           trackballArgs.chartPointInfo.dataPointIndex;
       ctrl.updateChartInfo(
         currentIndex:
             trackballArgs.chartPointInfo.dataPointIndex,
         updateDateString: true,
       );
     }
   },
   trackballBehavior: TrackballBehavior(
     enable: true,
     activationMode: ActivationMode.singleTap,
     tooltipSettings: const InteractiveTooltip(
       enable: false,
     ),
     shouldAlwaysShow: true,
     lineType: TrackballLineType.none,
     markerSettings: TrackballMarkerSettings(
       color: Colors.blue,
       width: 10.rMin,
       height: 10.rMin,
       borderColor: Colors.blue.withOpacity(0.2),
       borderWidth: 40,
       shape: DataMarkerType.circle,
       markerVisibility: TrackballVisibilityMode.visible,
     ),
   ),
   series: <ChartSeries<ChartData, DateTime>>[
     FastLineSeries<ChartData, DateTime>(
       color: Colors.blue,
       dataSource: chartData,
       xValueMapper: (ChartData sales, _) => sales.date,
       yValueMapper: (ChartData sales, _) => sales.price,
       onPointTap: (point) {
         ctrl.updateChartInfo(
           currentIndex: point.pointIndex ?? 0,
           updateDateString: true,
         );
       },
     ),
   ],
 )

Video:
https://github.com/syncfusion/flutter-widgets/assets/44993081/e956d3f1-487b-49a5-9dea-4f3d359b4ef4

Note: If we do use any other shape apart from the circle for track ball it's working fine.

@VijayakumarMariappan VijayakumarMariappan added charts Charts component open Open labels Apr 10, 2024
@ghost
Copy link

ghost commented Apr 16, 2024

Hi @DhavalRKansara,

We have reproduced the issue you reported on our end and the issue is scheduled to be fixed in our upcoming weekly patch release on April 30, 2024. We will notify you here once the release has been rolled out, and we appreciate your patience in the meantime.

Regards,
Lokesh P.

@VijayakumarMariappan VijayakumarMariappan added follow-up scheduled Follow-up scheduled and removed open Open labels Apr 23, 2024
@PreethikaSelvam
Copy link
Contributor

PreethikaSelvam commented Apr 30, 2024

Hi @DhavalRKansara,

As mentioned in our previous update, we tried to resolve this issue but found that it was recurring even in a basic sample where we attempted to draw a large stroke using a path.addOval, confirming that this is an issue with the framework. So, we have logged a bug report in the Flutter GitHub repository with all the necessary information. You can track the status of this Flutter framework issue from the below link.

Link: flutter/flutter#147297

If you have any further queries, please feel free to reach out to us.

Regards,
Preethika Selvam.

@VijayakumarMariappan VijayakumarMariappan added waiting for customer response Cannot make further progress until the customer responds. framework issue Something isn't working which depends framework and removed follow-up scheduled Follow-up scheduled labels May 3, 2024
@VijayakumarMariappan VijayakumarMariappan added the bug Something isn't working label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working charts Charts component framework issue Something isn't working which depends framework waiting for customer response Cannot make further progress until the customer responds.
Projects
None yet
Development

No branches or pull requests

3 participants