Skip to content

Trackball Overlapping after Flutter Upgrade #2205

Closed
@lsrmg

Description

@lsrmg

Bug description

After upgrading Flutter to 3.27.0 (from 3.24.4) the Z-axis for the Trackball are not working correctly anymore.
The same issue is present for Crosshair Tooltips for example.

(updating syncfusion_flutter_charts from 27.1.53 to 28.1.33 didn't resolve the issue)

Steps to reproduce

  1. Upgrading to flutter 3.27.0

Code sample

Code sample
SfCartesianChart(
              plotAreaBorderColor: theme.colorScheme.pmBarBackground,
              plotAreaBorderWidth: 1,
              zoomPanBehavior: ZoomPanBehavior(
                  enableDoubleTapZooming: true,
                  zoomMode: ZoomMode.x,
                  enablePinching: true),
              trackballBehavior: TrackballBehavior(
                  enable: true,
                  activationMode: ActivationMode.singleTap,
                  tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
                  tooltipSettings: InteractiveTooltip(
                      enable: true,
                      format: 'point.y ${chartData.firstOrNull?.unit ?? ''}',
                      borderWidth: 1,
                      borderColor: theme.colorScheme.onSurface,
                      textStyle: TextStyle(color: theme.colorScheme.onSurface),
                      color: theme.colorScheme.surface)),
              primaryXAxis: DateTimeAxis(
                  dateFormat: timeFormat24hSetting.when(
                    data: (is24h) =>
                        is24h ? chartTimeFormat24h : chartTimeFormat12h,
                    loading: () => chartTimeFormat12h,
                    error: (_, __) => chartTimeFormat12h,
                  ),
                  interactiveTooltip: InteractiveTooltip(
                      arrowLength: 0,
                      // Enables the crosshair tooltip
                      enable: true)),
              primaryYAxis: NumericAxis(
                  majorGridLines:
                      MajorGridLines(color: theme.colorScheme.pmBarBackground),
                  interactiveTooltip: InteractiveTooltip(
                      // Disables the crosshair tooltip
                      enable: false)),
              legend: Legend(isVisible: true, position: LegendPosition.bottom),
              // Enable tooltip
              series: <CartesianSeries>[
                FastLineSeries<ChartData, DateTime>(
                    dataSource: chartData,
                    xValueMapper: (ChartData data, _) => data.date,
                    yValueMapper: (ChartData data, _) => data.value,
                    emptyPointSettings:
                        const EmptyPointSettings(mode: EmptyPointMode.average),
                    name: dataLegend,
                    color: theme.colorScheme.pmLineChartColor1,
                    // Duration of series animation
                    animationDuration: 500),
                if (secondDataLegend != '')
                  FastLineSeries<ChartData, DateTime>(
                    dataSource: secondChartData,
                    xValueMapper: (ChartData data, _) => data.date,
                    yValueMapper: (ChartData data, _) => data.value,
                    emptyPointSettings:
                        const EmptyPointSettings(mode: EmptyPointMode.average),
                    name: secondDataLegend,
                    color: theme.colorScheme.pmLineChartColor2,
                    // Duration of series animation
                    animationDuration: 500,
                  )
              ],
            ),

Screenshots or Video

Video demonstration
Screen.Recording.2024-12-13.at.17.03.05.mov

Stack Traces

Stack Traces
-```

</details>


### On which target platforms have you observed this bug?

Android, iOS

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.27.0, on macOS 15.2 24C101 darwin-arm64, locale en-US)
    • Flutter version 3.27.0 on channel stable at /Users/lars/flutter
    • Upstream repository https://github.com/flutter/flutter.gitFramework revision 8495dee1fd (3 days ago), 2024-12-10 14:23:39 -0800Engine revision 83bacfc525
    • Dart version 3.6.0DevTools version 2.40.2

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/lars/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/macos-android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/DeveloperBuild 16C5032a
    • CocoaPods version 1.15.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google
    Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2024.2)
    • Android Studio at /Applications/Android Studio.app/ContentsFlutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutterDart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dartJava version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

[✓] VS Code (version 1.96.0)
    • VS Code at /Applications/Visual Studio Code.app/ContentsFlutter extension version 3.102.0

[✓] Connected device (4 available)

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    chartsCharts componentframework issueSomething isn't working which depends frameworksolvedSolved the query using existing solutionswaiting for customer responseCannot make further progress until the customer responds.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions