diff --git a/dart/packages/ver/lib/main.dart b/dart/packages/ver/lib/main.dart index 13131df2b..82f2d088a 100644 --- a/dart/packages/ver/lib/main.dart +++ b/dart/packages/ver/lib/main.dart @@ -68,7 +68,8 @@ void main() { title: 'Ver', theme: ThemeData( brightness: Brightness.dark, - //primarySwatch: Colors.lightBlue, + //primaryColor: Colors.lightBlue[800], + //accentColor: Colors.cyan[600], fontFamily: 'Roboto', ), home: MultiProvider( 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 b8a103be9..a99729a91 100644 --- a/dart/packages/ver/lib/src/widgets/time_series_chart.dart +++ b/dart/packages/ver/lib/src/widgets/time_series_chart.dart @@ -15,8 +15,8 @@ class ServerCharts extends StatelessWidget { return ListView(children: [ SizedBox(height: 220.0, child: ServerLoadChart(server)), SizedBox(height: 220.0, child: ServerPerformanceChart(server)), - SizedBox(height: 220.0, child: ClientLoadChart(server.clientLoadManager)), - SizedBox(height: 220.0, child: ClientPerformanceChart(server.clientLoadManager)), + //SizedBox(height: 220.0, child: ClientLoadChart(server.clientLoadManager)), + //SizedBox(height: 220.0, child: ClientPerformanceChart(server.clientLoadManager)), ]); } } @@ -256,19 +256,40 @@ class BetterLineChart extends charts.LineChart { final int itemCount; final Object lastItem; - BetterLineChart(List> seriesList) - : + BetterLineChart(List> seriesList): itemCount = seriesList[0].data.length, lastItem = seriesList[0].data.last, super( - seriesList, - behaviors: [charts.SeriesLegend()], - domainAxis: charts.NumericAxisSpec( - viewport: new charts.NumericExtents( - max(0, seriesList[0].data.last.tick - 60), seriesList[0].data.last.tick - ) - ) - ); + seriesList, + behaviors: [charts.SeriesLegend()], + domainAxis: charts.NumericAxisSpec( + viewport: new charts.NumericExtents( + max(0, seriesList[0].data.last.tick - 60), seriesList[0].data.last.tick + ), + renderSpec: new charts.SmallTickRendererSpec( + labelStyle: new charts.TextStyleSpec( + color: charts.MaterialPalette.gray.shade50 + ), + lineStyle: new charts.LineStyleSpec( + color: charts.MaterialPalette.black + ) + ), + ), + primaryMeasureAxis: new charts.NumericAxisSpec( + renderSpec: new charts.GridlineRendererSpec( + labelStyle: new charts.TextStyleSpec( + color: charts.MaterialPalette.white + ), + lineStyle: new charts.LineStyleSpec( + color: charts.MaterialPalette.gray.shade100 + ), + ), + tickProviderSpec: new charts.BasicNumericTickProviderSpec( + dataIsInWholeNumbers: true, + desiredTickCount: 5 + ) + ), + ); @override void updateCommonChart(common.BaseChart baseChart, charts.BaseChart oldWidget,