CHG: [history widget] select last measurement initally

This commit is contained in:
Chris "koying" Browet 2019-06-25 19:49:10 +02:00 committed by Chris "Koying" Browet
parent 5c31ddd00f
commit 57c3083f9f
3 changed files with 3 additions and 3 deletions

View File

@ -148,7 +148,7 @@ class _CombinedHistoryChartWidgetState extends State<CombinedHistoryChartWidget>
});
if ((_selectedId == -1) && (numericDataLists.isNotEmpty)) {
_selectedId = 0;
_selectedId = numericDataLists.length -1;
}
List<charts.Series<EntityHistoryMoment, DateTime>> result = [];
numericDataLists.forEach((attrName, dataList) {

View File

@ -103,7 +103,7 @@ class _NumericStateHistoryChartWidgetState extends State<NumericStateHistoryChar
id: widget.rawHistory.length
));
if (_selectedId == -1) {
_selectedId = 0;
_selectedId = data.length - 1;
}
return [
new charts.Series<EntityHistoryMoment, DateTime>(

View File

@ -101,7 +101,7 @@ class _SimpleStateHistoryChartWidgetState extends State<SimpleStateHistoryChartW
colorId: data.last.colorId
));
if (_selectedId == -1) {
_selectedId = 0;
_selectedId = data.length - 1;
}
return [
new charts.Series<EntityHistoryMoment, DateTime>(