Skip to content

Commit 1222cff

Browse files
authored
fix: LineChartDataPoint.tooltip not properly rendered (#5105)
* initial commit * pubspec
1 parent aeb2399 commit 1222cff

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/flet/lib/src/controls/linechart.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,7 @@ class _LineChartControlState extends State<LineChartControl> {
356356
return touchedSpots.map((spot) {
357357
var dp = viewModel.dataSeries[spot.barIndex]
358358
.dataPoints[spot.spotIndex];
359-
var tooltip = dp.tooltip != null
360-
? jsonDecode(dp.tooltip!)
361-
: dp.y.toString();
359+
var tooltip = dp.tooltip ?? dp.y.toString();
362360
var tooltipStyle = parseTextStyle(
363361
Theme.of(context), dp.control, "tooltipStyle");
364362
tooltipStyle ??= const TextStyle();

0 commit comments

Comments
 (0)