Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PROG2900
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sara Savanovic Djordjevic
PROG2900
Commits
5df3ade6
Commit
5df3ade6
authored
11 months ago
by
Sara Savanovic Djordjevic
Browse files
Options
Downloads
Patches
Plain Diff
update: even better chart appearance
parent
44c28c77
No related branches found
Branches containing commit
No related tags found
1 merge request
!11
Clhp map
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/lib/widgets/bar_graph/bar_data.dart
+1
-4
1 addition, 4 deletions
app/lib/widgets/bar_graph/bar_data.dart
app/lib/widgets/main_layout.dart
+47
-39
47 additions, 39 deletions
app/lib/widgets/main_layout.dart
app/lib/widgets/stat_charts.dart
+0
-64
0 additions, 64 deletions
app/lib/widgets/stat_charts.dart
with
48 additions
and
107 deletions
app/lib/widgets/bar_graph/bar_data.dart
+
1
−
4
View file @
5df3ade6
...
@@ -98,9 +98,7 @@ class _BarDataState extends State<BarData> {
...
@@ -98,9 +98,7 @@ class _BarDataState extends State<BarData> {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Padding
(
return
Column
(
padding:
const
EdgeInsets
.
only
(
top:
16
),
child:
Column
(
children:
[
children:
[
SizedBox
(
SizedBox
(
width:
MediaQuery
.
of
(
context
)
.
size
.
width
,
// Set the desired width
width:
MediaQuery
.
of
(
context
)
.
size
.
width
,
// Set the desired width
...
@@ -164,7 +162,6 @@ class _BarDataState extends State<BarData> {
...
@@ -164,7 +162,6 @@ class _BarDataState extends State<BarData> {
),
),
),
),
],
],
),
);
);
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app/lib/widgets/main_layout.dart
+
47
−
39
View file @
5df3ade6
...
@@ -217,49 +217,57 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
...
@@ -217,49 +217,57 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
],
],
),
),
const SizedBox(height: contPadding), // Padding between containers
const SizedBox(height: contPadding), // Padding between containers
ClipRRect(
Column(
borderRadius: BorderRadius.circular(20),
crossAxisAlignment: CrossAxisAlignment.start,
child: SizedBox(
children: [
SizedBox(
width: screenWidth * boxWidth,
child: Align(
alignment: Alignment.topLeft,
child: Padding(
padding: const EdgeInsets.only(top: 20, left: 30), // Updated padding
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'
Ice
stats
',
style: titleStyle,
),
const Divider(),
const SizedBox(height: 10), // Reduced padding
Text(
'
Measured
at
',
style: subHeadingStyle,
),
Text(
'
Date:
$
{(
selectedTile
?.
timeMeasured
.
day
??
'-'
)}
/
$
{(
selectedTile
?.
timeMeasured
.
month
??
'-'
)}
/
$
{(
selectedTile
?.
timeMeasured
.
year
??
'-'
)}
',
style: regTextStyle,
),
Text(
'
Time:
$
{
selectedTile
?.
timeMeasured
.
hour
}
:
00
',
style: regTextStyle,
),
],
),
),
),
),
const SizedBox(height: contPadding*2),
SizedBox(
width: screenWidth * boxWidth * 1.2,
width: screenWidth * boxWidth * 1.2,
height: screenWidth * boxHeight * 1.5, // NB: make dynamic
child: Center(
child: Align(
child: Text(
alignment: Alignment.topLeft,
'
Measuring
point:
(
$
{
selectedTile
?.
measurementID
},
$
{
selectedTile
?.
measurementID
})
',
child: Padding(
style: regTextStyle,
padding: const EdgeInsets.only(top: 20, left: 20), // Edge padding, text
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'
Ice
stats
',
style: titleStyle,
),
const Divider(),
const Padding(padding: EdgeInsets.all(10)),
Text(
'
Measured
at
',
style: subHeadingStyle,
),
Text(
'
Date:
$
{(
selectedTile
?.
timeMeasured
.
day
??
'-'
)}
/
$
{(
selectedTile
?.
timeMeasured
.
month
??
'-'
)}
/
$
{(
selectedTile
?.
timeMeasured
.
year
??
'-'
)}
',
style: regTextStyle,
),
Text(
'
Time:
$
{
selectedTile
?.
timeMeasured
.
hour
}
:
00
',
style: regTextStyle,
),
const SizedBox(height: contPadding),
Text(
'
Measuring
point:
(
$
{
selectedTile
?.
measurementID
},
$
{
selectedTile
?.
measurementID
})
',
style: regTextStyle,
),
const SizedBox(height: contPadding),
const SizedBox(height: 15),
const StatCharts(),
],
),
),
),
),
),
),
),
SizedBox(
width: screenWidth * boxWidth * 1.2,
height: screenWidth * boxHeight * 1.5,
child: const StatCharts(),
)
],
),
),
],
],
);
);
...
...
This diff is collapsed.
Click to expand it.
app/lib/widgets/stat_charts.dart
+
0
−
64
View file @
5df3ade6
...
@@ -64,70 +64,6 @@ class StatCharts extends StatelessWidget {
...
@@ -64,70 +64,6 @@ class StatCharts extends StatelessWidget {
);
);
}
}
Widget
buildBarChart
(
BuildContext
context
)
{
return
Padding
(
padding:
const
EdgeInsets
.
only
(
right:
20
),
child:
BarChart
(
BarChartData
(
alignment:
BarChartAlignment
.
spaceAround
,
maxY:
20
,
barTouchData:
BarTouchData
(
enabled:
false
),
backgroundColor:
Colors
.
grey
.
shade800
,
titlesData:
FlTitlesData
(
bottomTitles:
SideTitles
(
showTitles:
true
,
getTextStyles:
(
value
)
=
>
const
TextStyle
(
color:
Colors
.
white60
),
margin:
10
,
getTitles:
(
value
)
{
switch
(
value
.
toInt
())
{
case
0
:
return
'Value'
;
case
1
:
return
'Value'
;
case
2
:
return
'Value'
;
default
:
return
''
;
}
},
),
leftTitles:
SideTitles
(
showTitles:
true
,
getTextStyles:
(
value
)
=
>
const
TextStyle
(
color:
Colors
.
white60
),
margin:
10
,
reservedSize:
30
,
interval:
5
,
),
),
borderData:
FlBorderData
(
show:
true
,
border:
Border
.
all
(
color:
Colors
.
white60
,
width:
1
),
),
barGroups:
[
BarChartGroupData
(
x:
0
,
barRods:
[
BarChartRodData
(
y:
15
,
width:
10
),
],
),
BarChartGroupData
(
x:
1
,
barRods:
[
BarChartRodData
(
y:
10
,
width:
10
),
],
),
BarChartGroupData
(
x:
2
,
barRods:
[
BarChartRodData
(
y:
18
,
width:
10
),
],
),
],
),
),
);
}
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Column
(
return
Column
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment