diff --git a/pkg/web_app/lib/src/widget/weekly_sparkline/widget.dart b/pkg/web_app/lib/src/widget/weekly_sparkline/widget.dart index 6584a32c6..f95348139 100644 --- a/pkg/web_app/lib/src/widget/weekly_sparkline/widget.dart +++ b/pkg/web_app/lib/src/widget/weekly_sparkline/widget.dart @@ -162,15 +162,15 @@ void drawChart(Element svg, HTMLDivElement toolTip, HTMLDivElement chartSubText, lastSelectedDay = selectedDay.date; }); - void erase(_) { + void hideSparklineCursor(_) { sparklineCursor.setAttribute('style', 'opacity:0'); toolTip.setAttribute('style', 'opacity:0;position:absolute;'); - chartSubText.text = '${formatDate(firstDay)} - ${formatDate(lastDate)}'; + lastSelectedDay = null; } - erase(1); - chart.onMouseLeave.listen(erase); + hideSparklineCursor(1); + chart.onMouseLeave.listen(hideSparklineCursor); } int lowerBoundBy(List sortedList, K Function(E element) keyOf,