Skip to content

Tooltip disappearing after upgrade from 0.36.4 to 0.55 on dragging #1114

Closed
@Sesa1988

Description

@Sesa1988

I have a weird issue on a real device and release mode.

If I drag from left to right pretty fast over my line chart the tooltip is visible for a small amount of time and disappears.
After the second or third drag everything works as expected and the tooltip is following the line without disappearing.
Its laggy as well even on release mode what wasn't on the previous version.

lineTouchData: LineTouchData(
        getTouchLineStart: (barData, index) => -double.infinity,
        getTouchLineEnd: (barData, index) => double.infinity,
        touchTooltipData: LineTouchTooltipData(
          tooltipBgColor: PlatformHelper.isDesktop()
              ? primaryColor.withOpacity(0.8)
              : primaryColor,
          fitInsideHorizontally: true,
          tooltipMargin: PlatformHelper.isDesktop() ? 20 : 0,
          showOnTopOfTheChartBoxArea: PlatformHelper.isDesktop() ? false : true,
          getTooltipItems: (touchedSpots) {
            return touchedSpots
                .map((e) => LineTooltipItem(
                      '${MarketFormat.getMarketChartTooltipPriceString(e.y, selectedCurrency.currency, true)} \n\n ${DateFormat.yMd(Platform.localeName).format(points[e.spotIndex].time.toLocal())} \n ${DateFormat.jm(Platform.localeName).format(points[e.spotIndex].time.toLocal())}',
                      const TextStyle(color: Colors.white, fontSize: 14),
                    ))
                .toList();
          },
        ),
        touchCallback: (LineTouchResponse touchResponse) {},
        handleBuiltInTouches: true,
        getTouchedSpotIndicator: (barData, spotIndexes) {
          return _touchIndicator(
              barData, spotIndexes, primaryColor, scaffoldColor);
        },
      ),

Has someone this issue as well?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions