Skip to content
Snippets Groups Projects
Commit bb1410cf authored by Sara Savanovic Djordjevic's avatar Sara Savanovic Djordjevic
Browse files

update: initiali implementation of dynamic bar data allocation

parent 86978592
No related branches found
No related tags found
1 merge request!12Clhp map
......@@ -15,24 +15,10 @@ class BarData extends StatefulWidget {
class _BarDataState extends State<BarData> {
static const double barWidth = 30;
// NB should be allocated values dynamically
/*
selectedTile.IceStats.asMap().forEach((index, iceStats) {
barData[index] = [iceStats.slushIce, iceStats.blackIce,
iceStats.snowDepth, iceStats.steelIce];
});
*/
// Bar items show data for 10 previous days
static const barData = <int, List<double>>{
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],
};
// Allocate bar data dynamically from selected subdivision
var barData = Map<int, List<double>>.from(selectedSubDiv!.iceStats.asMap().map((index, iceStats) {
return MapEntry(index, [iceStats.slushIce, iceStats.blackIce, iceStats.snowDepth]);
})); // NB should not be index, should be the date, fix
int touchedIndex = -1;
......@@ -46,9 +32,8 @@ class _BarDataState extends State<BarData> {
double value1,
double value2,
double value3,
double value4,
) {
final sum = value1 + value2 + value3 + value4;
final sum = value1 + value2 + value3;
final isTouched = touchedIndex == x;
return BarChartGroupData(
x: x,
......@@ -77,11 +62,6 @@ class _BarDataState extends State<BarData> {
value1 + value2 + value3,
const Color(0xFF3766E0),
),
BarChartRodStackItem(
value1 + value2 + value3,
value1 + value2 + value3 + value4,
Colors.white60,
),
],
),
],
......@@ -187,7 +167,6 @@ class _BarDataState extends State<BarData> {
e.value[0],
e.value[1],
e.value[2],
e.value[3],
),
).toList(),
),
......
......@@ -42,3 +42,37 @@
13:25: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:25: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:25: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
13:38: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
14:00: weatherelement.py -> patch_novalue_in_weather_element_list: Value missing on UTM33 X266707 Y6749365 2024-01-10 06:00:00 tm. Adding avg value -11.049999999999969.
No preview for this file type
......@@ -81,6 +81,8 @@ def get_measurements(self, cursor, lake_name):
'Subdivisions': [sub_division], # Array of sub_division objects
}
# Add remaining stuff
# NB remember to clos file after implementation
# f.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment