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

Trackball and crosshair is not visible in Sfcartision from latest version 27.x.52 #2125

Open
upendra-bajpai opened this issue Oct 12, 2024 · 5 comments
Labels
charts Charts component open Open

Comments

@upendra-bajpai
Copy link

upendra-bajpai commented Oct 12, 2024

Bug description

I had implemented trackball with version 24.x.x but recently I updated to latest version.
Now I can't see trackball or crosshair although I can see label on x axis hilighted while traversing.
Restoring to previous version I can see them again.
Is there anything which I need to update or it's a bug?

Ps.Thank you for this library

Steps to reproduce

Just update to 27.x.x for charts and impliment trackball in Sfcartision charts. Both Android and iOS can't show the trackball.

    _trackballBehavior = TrackballBehavior(
      enable: true,
      activationMode: ActivationMode.singleTap,
      lineType: TrackballLineType.vertical,
      lineColor: Colors.blue,
      markerSettings: TrackballMarkerSettings(
          color: Colors.white,
          borderColor: Colors.blue,
          borderWidth: 9,
          width: 5,
          height: 5,
          shape: DataMarkerType.circle,
          markerVisibility: TrackballVisibilityMode.visible),
      lineDashArray: [5, 5],
      builder: (BuildContext context, TrackballDetails trackballDetails) {
        final ChartData point = widget.data[trackballDetails.pointIndex!];
        // widget.onDataPointSelected.call(point);
        return Container(
          decoration: BoxDecoration(
            color: Colors.black.withOpacity(0.4),
            borderRadius: BorderRadius.circular(4),
          ),
          child: SectionSum(
              sum: (point.y! * 100).toInt(),
              textStyle: TextStyle(
                color: Colors.white,
                backgroundColor: Colors.black.withOpacity(0.4),
                fontFamily: GoogleFonts.poppins().fontFamily,
                fontSize: 12,
                fontWeight: FontWeight.w700,
              )),
        );
      },
    );

Screenshots or Video

Screenshots / Video demonstration

I can update if needed

Stack Traces

Stack Traces
No crashes available 

On which target platforms have you observed this bug?

iOS

Flutter Doctor output

Doctor output
@VijayakumarMariappan VijayakumarMariappan added charts Charts component open Open labels Oct 14, 2024
@baconbyte
Copy link

I am seeing similar after just updating, I have a customised trackball, when I assign a custom builder the line no longer appears in 27.x.x but it did for 24.x.x

@baconbyte
Copy link

I had a quick look at the code in the debugger and it looks when I assign a custom builder the chartPointInfo collection is cleared before the line is drawn, it is not cleared when there isn't a custom builder assigned. I'm not sure where/when this is collection is cleared

void _drawTrackballLine(PaintingContext context, Offset offset, SfChartThemeData chartThemeData, ThemeData themeData) { if (chartPointInfo.isNotEmpty && lineType != TrackballLineType.none) { final Paint paint = Paint()

@upendra-bajpai
Copy link
Author

Without custom builder is it working? I am trying but no luck. I am expecting someone from syncfustion team to take a look at it.

@baconbyte
Copy link

Yes, it works when there isn't a custom builder for me, but I need the builder.

@stephengibson83
Copy link

Commenting to bump this issue a bit. I am also encountering the same issue and hoping for a fix ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
charts Charts component open Open
Projects
None yet
Development

No branches or pull requests

4 participants