barTouchData property

BarTouchData get barTouchData

Implementation

BarTouchData get barTouchData => BarTouchData(
      enabled: true,
      touchTooltipData: BarTouchTooltipData(
        getTooltipColor: (group) => Colors.orangeAccent,
        tooltipPadding: const EdgeInsets.all(0),
        tooltipMargin: 8,
        getTooltipItem: (
          BarChartGroupData group,
          int groupIndex,
          BarChartRodData rod,
          int rodIndex,
        ) {
          return BarTooltipItem(
            controller.labels[group.x] + ':' + rod.toY.round().toString(),
            const TextStyle(
              color: Colors.blueGrey,
              fontWeight: FontWeight.bold,
            ),
          );
        },
      ),
    );