diff --git a/app/lib/widgets/bar_graph/bar_data.dart b/app/lib/widgets/bar_graph/bar_data.dart index 6ef9b182597faf1fd8a5cc2dab159c7edea16153..db2c2599e619c6d367834e719972fda637164495 100644 --- a/app/lib/widgets/bar_graph/bar_data.dart +++ b/app/lib/widgets/bar_graph/bar_data.dart @@ -16,14 +16,15 @@ class _BarDataState extends State<BarData> { // NB should be allocated values dynamically // Bar items show data for 10 previous days static const barData = <int, List<double>>{ - 0: [1.5, 4, 2.5], - 1: [1.8, 5.6, 3], - 2: [1.5, 3.1, 3.5], - 3: [1.5, 1.5, 4], - 4: [2, 2, 5], - 5: [1.2, 1.5, 4.3], - 6: [1.2, 4.8, 5], + 0: [1.5, 3.2, 1.5, 2.2], + 1: [1.8, 4.6, 2, 3.1], + 2: [1.5, 2.1, 2.5, 1.8], + 3: [1.5, 1, 3, 2.6], + 4: [2, 2, 3.9, 2.3], + 5: [1.2, 1.2, 3.3, 2.9], + 6: [1.2, 2.3, 3.3, 3.2], }; + int touchedIndex = -1; @override @@ -36,8 +37,9 @@ class _BarDataState extends State<BarData> { double value1, double value2, double value3, + double value4, ) { - final sum = value1 + value2 + value3; + final sum = value1 + value2 + value3 + value4; final isTouched = touchedIndex == x; return BarChartGroupData( x: x, @@ -64,6 +66,11 @@ class _BarDataState extends State<BarData> { BarChartRodStackItem( value1 + value2, value1 + value2 + value3, + const Color(0xFF3766E0), + ), + BarChartRodStackItem( + value1 + value2 + value3, + value1 + value2 + value3 + value4, Colors.white60, ), ], @@ -144,6 +151,7 @@ class _BarDataState extends State<BarData> { e.value[0], e.value[1], e.value[2], + e.value[3], ), ).toList(), ), @@ -156,8 +164,9 @@ class _BarDataState extends State<BarData> { mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ _buildLegendItem(Colors.white60, "Snow"), + _buildLegendItem(const Color(0xFF3766E0), "Slush ice"), _buildLegendItem(const Color(0xFF000085), "Black ice"), - _buildLegendItem(const Color(0xFF13dbff), "Slush ice"), + _buildLegendItem(const Color(0xFF13dbff), "Steel ice"), ], ), ), diff --git a/app/lib/widgets/main_layout.dart b/app/lib/widgets/main_layout.dart index 767d42292b6ed5c7f3fbcdba7092036842e27d22..d0874add77e1b6118ac21a667a05e852e3cced27 100644 --- a/app/lib/widgets/main_layout.dart +++ b/app/lib/widgets/main_layout.dart @@ -60,7 +60,7 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { void handleSelection(int index) { String indexString = index.toString(); setState(() { - // NB should be optimalised + // NB should be optimised for (Measurement measurement in widget.markerList) { for (SubDiv subdivision in measurement.subDivs) { if (subdivision.sub_div_id == indexString) { @@ -283,8 +283,8 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { const SizedBox(width: 10), Expanded( child: Text( - 'For every x of y, there has to be z cm of ' - 'q for every kg of applied weight to ensure ?', + 'There may be multiple layers of black ice and slush ice stacked' + ' between the snow and the steel ice.', style: regTextStyle, ), ),