diff --git a/lib/entity_widgets/entity_colors.class.dart b/lib/entity_widgets/entity_colors.class.dart index 615bca6..7ce4f7c 100644 --- a/lib/entity_widgets/entity_colors.class.dart +++ b/lib/entity_widgets/entity_colors.class.dart @@ -15,8 +15,6 @@ class EntityColors { "default": Color.fromRGBO(68, 115, 158, 1.0), "heat": Colors.redAccent, "cool": Colors.lightBlue, - "closing": Colors.cyan, - "opening": Colors.purple, "unavailable": Colors.black26, "unknown": Colors.black26, }; diff --git a/lib/entity_widgets/history_chart/combined_history_chart.dart b/lib/entity_widgets/history_chart/combined_history_chart.dart index 2bd7544..9759d28 100644 --- a/lib/entity_widgets/history_chart/combined_history_chart.dart +++ b/lib/entity_widgets/history_chart/combined_history_chart.dart @@ -52,15 +52,10 @@ class _CombinedHistoryChartWidgetState extends State tickProviderSpec: new charts.BasicNumericTickProviderSpec(zeroBound: false)), dateTimeFactory: const charts.LocalDateTimeFactory(), - defaultRenderer: charts.LineRendererConfig(includeArea: false), - customSeriesRenderers: [ - new charts.PointRendererConfig( - // ID used to link series to this renderer. - customRendererId: 'valuePoints') - ], - /*primaryMeasureAxis: charts.NumericAxisSpec( - renderSpec: charts.NoneRenderSpec() - ),*/ + defaultRenderer: charts.LineRendererConfig( + includeArea: false, + includePoints: true + ), selectionModels: [ new charts.SelectionModelConfig( type: charts.SelectionModelType.info, @@ -118,18 +113,11 @@ class _CombinedHistoryChartWidgetState extends State new charts.Series( id: "value", colorFn: (CombinedEntityStateHistoryMoment historyMoment, __) => EntityColors.chartHistoryStateColor("_", historyMoment.colorId), - domainFn: (CombinedEntityStateHistoryMoment historyMoment, _) => historyMoment.time, - measureFn: (CombinedEntityStateHistoryMoment historyMoment, _) => historyMoment.value, - data: dataItem, - ), - new charts.Series( - id: "points", radiusPxFn: (CombinedEntityStateHistoryMoment historyMoment, __) => (historyMoment.id == _selectedId) ? 5.0 : 1.0, - colorFn: (CombinedEntityStateHistoryMoment historyMoment, __) => EntityColors.chartHistoryStateColor("_", historyMoment.colorId), domainFn: (CombinedEntityStateHistoryMoment historyMoment, _) => historyMoment.time, measureFn: (CombinedEntityStateHistoryMoment historyMoment, _) => historyMoment.value, data: dataItem, - )..setAttribute(charts.rendererIdKey, 'valuePoints') + ) ]); }); return result; 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 d8d83bb..98120cc 100644 --- a/lib/entity_widgets/history_chart/numeric_state_history_chart.dart +++ b/lib/entity_widgets/history_chart/numeric_state_history_chart.dart @@ -48,12 +48,9 @@ class _NumericStateHistoryChartWidgetState extends State historyMoment.time, measureFn: (NumericEntityStateHistoryMoment historyMoment, _) => historyMoment.value, data: data, - ), - new charts.Series( - id: 'State', radiusPxFn: (NumericEntityStateHistoryMoment historyMoment, __) => (historyMoment.id == _selectedId) ? 5.0 : 1.0, - colorFn: (NumericEntityStateHistoryMoment historyMoment, __) => EntityColors.chartHistoryStateColor("on", -1), - domainFn: (NumericEntityStateHistoryMoment historyMoment, _) => historyMoment.time, - measureFn: (NumericEntityStateHistoryMoment historyMoment, _) => historyMoment.value, - data: data, - )..setAttribute(charts.rendererIdKey, 'valuePoints') + ) ]; } diff --git a/lib/entity_widgets/history_chart/simple_state_history_chart.dart b/lib/entity_widgets/history_chart/simple_state_history_chart.dart index 523bc64..05c3e00 100644 --- a/lib/entity_widgets/history_chart/simple_state_history_chart.dart +++ b/lib/entity_widgets/history_chart/simple_state_history_chart.dart @@ -98,7 +98,7 @@ class _SimpleStateHistoryChartWidgetState extends State( id: 'State', - strokeWidthPxFn: (SimpleEntityStateHistoryMoment historyMoment, __) => (historyMoment.id == _selectedId) ? 6.0 : 4.0, + strokeWidthPxFn: (SimpleEntityStateHistoryMoment historyMoment, __) => (historyMoment.id == _selectedId) ? 6.0 : 3.0, colorFn: (SimpleEntityStateHistoryMoment historyMoment, __) => EntityColors.chartHistoryStateColor(historyMoment.state, historyMoment.colorId), domainFn: (SimpleEntityStateHistoryMoment historyMoment, _) => historyMoment.startTime, measureFn: (SimpleEntityStateHistoryMoment historyMoment, _) => 10,