improvements to graphs
This commit is contained in:
parent
fdb6a5c69b
commit
503cd3ca59
4 changed files with 36 additions and 7 deletions
29
lib/pages/charts/preset_graphs.dart
Normal file
29
lib/pages/charts/preset_graphs.dart
Normal file
|
@ -0,0 +1,29 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:charts_flutter/flutter.dart' as charts;
|
||||
import 'package:local_spend/common/apifunctions/get_graph_data.dart';
|
||||
|
||||
class PresetChart extends StatefulWidget {
|
||||
PresetChart({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_PresetChartState createState() {
|
||||
return _PresetChartState();
|
||||
}
|
||||
}
|
||||
|
||||
class _PresetChartState extends State<PresetChart> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -122,7 +122,7 @@ class StatsPageState extends State<StatsPage> {
|
|||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10),
|
||||
height: 200,
|
||||
child: totalLastWeekGraph.graph != null ? new charts.TimeSeriesChart(totalLastWeekGraph.graph) : Container(), //List<Series<dynamic, DateTime>>
|
||||
child: totalLastWeekGraph.graph != null ? new charts.TimeSeriesChart(totalLastWeekGraph.graph) : Center(child: Text("Loading graph...")), //List<Series<dynamic, DateTime>>
|
||||
),
|
||||
|
||||
Container(
|
||||
|
@ -141,7 +141,7 @@ class StatsPageState extends State<StatsPage> {
|
|||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10),
|
||||
height: 200,
|
||||
child: avgSpendLastWeekGraph.graph != null ? new charts.TimeSeriesChart(avgSpendLastWeekGraph.graph) : Container(), //List<Series<dynamic, DateTime>>
|
||||
child: avgSpendLastWeekGraph.graph != null ? new charts.TimeSeriesChart(avgSpendLastWeekGraph.graph) : Center(child: Text("Loading graph...")), //List<Series<dynamic, DateTime>>
|
||||
),
|
||||
|
||||
Container(
|
||||
|
@ -160,7 +160,7 @@ class StatsPageState extends State<StatsPage> {
|
|||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10),
|
||||
height: 200,
|
||||
child: totalLastMonthGraph.graph != null ? new charts.TimeSeriesChart(totalLastMonthGraph.graph) : Container(), //List<Series<dynamic, DateTime>>
|
||||
child: totalLastMonthGraph.graph != null ? new charts.TimeSeriesChart(totalLastMonthGraph.graph) : Center(child: Text("Loading graph...")), //List<Series<dynamic, DateTime>>
|
||||
),
|
||||
|
||||
Container(
|
||||
|
@ -179,7 +179,7 @@ class StatsPageState extends State<StatsPage> {
|
|||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10),
|
||||
height: 200,
|
||||
child: avgSpendLastMonth.graph != null ? new charts.TimeSeriesChart(avgSpendLastMonth.graph) : Container(), //List<Series<dynamic, DateTime>>
|
||||
child: avgSpendLastMonth.graph != null ? new charts.TimeSeriesChart(avgSpendLastMonth.graph) : Center(child: Text("Loading graph...")), //List<Series<dynamic, DateTime>>
|
||||
),
|
||||
|
||||
],
|
||||
|
|
Reference in a new issue