From 16fb716872fd2c7d5d5700da535e9bad4e8ce666 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Tue, 16 Jul 2019 17:10:02 -0400 Subject: [PATCH] thicker chart line --- .../lib/src/widgets/time_series_chart.dart | 46 ++++++++++--------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/dart/packages/ver/lib/src/widgets/time_series_chart.dart b/dart/packages/ver/lib/src/widgets/time_series_chart.dart index a65173e39..4f936eb8a 100644 --- a/dart/packages/ver/lib/src/widgets/time_series_chart.dart +++ b/dart/packages/ver/lib/src/widgets/time_series_chart.dart @@ -40,11 +40,10 @@ class ServerLoadChartState extends State { super.initState(); seriesData = [ charts.Series( - id: 'Search Start', - colorFn: (_, __) => - charts.MaterialPalette.deepOrange.shadeDefault.lighter, + id: 'Search Cache', + colorFn: (_, __) => charts.MaterialPalette.green.shadeDefault.darker, domainFn: (ServerLoadDataPoint load, _) => load.tick, - measureFn: (ServerLoadDataPoint load, _) => load.search.started, + measureFn: (ServerLoadDataPoint load, _) => load.search.cache_hit, data: widget.server.serverLoadData, ), charts.Series( @@ -53,27 +52,16 @@ class ServerLoadChartState extends State { charts.MaterialPalette.deepOrange.shadeDefault.darker, domainFn: (ServerLoadDataPoint load, _) => load.tick, measureFn: (ServerLoadDataPoint load, _) => load.search.finished, + strokeWidthPxFn: (ServerLoadDataPoint load, _) => 5.0, data: widget.server.serverLoadData, ), charts.Series( - id: 'Search Cache', - colorFn: (_, __) => charts.MaterialPalette.green.shadeDefault.darker, + id: 'Search Start', + colorFn: (_, __) => + charts.MaterialPalette.deepOrange.shadeDefault.lighter, domainFn: (ServerLoadDataPoint load, _) => load.tick, - measureFn: (ServerLoadDataPoint load, _) => load.search.cache_hit, - data: widget.server.serverLoadData, - ), - charts.Series( - id: 'Resolve Start', - colorFn: (_, __) => charts.MaterialPalette.teal.shadeDefault.lighter, - domainFn: (ServerLoadDataPoint load, _) => load.tick, - measureFn: (ServerLoadDataPoint load, _) => load.resolve.started, - data: widget.server.serverLoadData, - ), - charts.Series( - id: 'Resolve Finish', - colorFn: (_, __) => charts.MaterialPalette.teal.shadeDefault.darker, - domainFn: (ServerLoadDataPoint load, _) => load.tick, - measureFn: (ServerLoadDataPoint load, _) => load.resolve.finished, + measureFn: (ServerLoadDataPoint load, _) => load.search.started, + strokeWidthPxFn: (ServerLoadDataPoint load, _) => 1.0, data: widget.server.serverLoadData, ), charts.Series( @@ -83,6 +71,22 @@ class ServerLoadChartState extends State { measureFn: (ServerLoadDataPoint load, _) => load.resolve.cache_hit, data: widget.server.serverLoadData, ), + charts.Series( + id: 'Resolve Finish', + colorFn: (_, __) => charts.MaterialPalette.teal.shadeDefault.darker, + domainFn: (ServerLoadDataPoint load, _) => load.tick, + measureFn: (ServerLoadDataPoint load, _) => load.resolve.finished, + strokeWidthPxFn: (ServerLoadDataPoint load, _) => 5.0, + data: widget.server.serverLoadData, + ), + charts.Series( + id: 'Resolve Start', + colorFn: (_, __) => charts.MaterialPalette.teal.shadeDefault.lighter, + domainFn: (ServerLoadDataPoint load, _) => load.tick, + measureFn: (ServerLoadDataPoint load, _) => load.resolve.started, + strokeWidthPxFn: (ServerLoadDataPoint load, _) => 1.0, + data: widget.server.serverLoadData, + ), ]; }