diff --git a/lib/entity_widgets/history_chart/combined_history_chart.dart b/lib/entity_widgets/history_chart/combined_history_chart.dart index d352742..785a227 100644 --- a/lib/entity_widgets/history_chart/combined_history_chart.dart +++ b/lib/entity_widgets/history_chart/combined_history_chart.dart @@ -202,6 +202,11 @@ class _CombinedHistoryChartWidgetState extends State _selectedId -= 1; }); } + else { + setState(() { + _selectedId = _parsedHistory.first.data.length - 1; + }); + } } void _selectNext() { @@ -210,6 +215,12 @@ class _CombinedHistoryChartWidgetState extends State _selectedId += 1; }); } + else { + setState(() { + _selectedId = 0; + }); + + } } void _onSelectionChanged(charts.SelectionModel model) { diff --git a/lib/entity_widgets/history_chart/numeric_state_history_chart.dart b/lib/entity_widgets/history_chart/numeric_state_history_chart.dart index d854206..8645a37 100644 --- a/lib/entity_widgets/history_chart/numeric_state_history_chart.dart +++ b/lib/entity_widgets/history_chart/numeric_state_history_chart.dart @@ -132,6 +132,11 @@ class _NumericStateHistoryChartWidgetState extends State