mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
Merge pull request #229 from SyncrowIOT/SP-1658-The-Analytics-charts-padding-is-not-aligned-with-the-design
Sp 1658 the analytics charts padding is not aligned with the design
This commit is contained in:
@ -38,7 +38,7 @@ abstract final class EnergyManagementChartsHelper {
|
|||||||
sideTitles: SideTitles(
|
sideTitles: SideTitles(
|
||||||
showTitles: true,
|
showTitles: true,
|
||||||
maxIncluded: false,
|
maxIncluded: false,
|
||||||
minIncluded: false,
|
minIncluded: true,
|
||||||
interval: leftTitlesInterval,
|
interval: leftTitlesInterval,
|
||||||
reservedSize: 110,
|
reservedSize: 110,
|
||||||
getTitlesWidget: (value, meta) => Padding(
|
getTitlesWidget: (value, meta) => Padding(
|
||||||
|
@ -23,7 +23,6 @@ class EnergyConsumptionPerDeviceChartBox extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
padding: const EdgeInsets.all(30),
|
padding: const EdgeInsets.all(30),
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 20,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
AnalyticsErrorWidget(state.errorMessage),
|
AnalyticsErrorWidget(state.errorMessage),
|
||||||
@ -52,7 +51,9 @@ class EnergyConsumptionPerDeviceChartBox extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
const Divider(height: 0),
|
const Divider(height: 0),
|
||||||
|
const SizedBox(height: 20),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: EnergyConsumptionPerDeviceChart(chartData: state.chartData),
|
child: EnergyConsumptionPerDeviceChart(chartData: state.chartData),
|
||||||
),
|
),
|
||||||
|
@ -19,7 +19,6 @@ class TotalEnergyConsumptionChartBox extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
padding: const EdgeInsets.all(30),
|
padding: const EdgeInsets.all(30),
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 20,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
AnalyticsErrorWidget(state.errorMessage),
|
AnalyticsErrorWidget(state.errorMessage),
|
||||||
@ -39,7 +38,9 @@ class TotalEnergyConsumptionChartBox extends StatelessWidget {
|
|||||||
const Spacer(flex: 4),
|
const Spacer(flex: 4),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
const SizedBox(height: 20),
|
||||||
TotalEnergyConsumptionChart(chartData: state.chartData),
|
TotalEnergyConsumptionChart(chartData: state.chartData),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -22,7 +22,6 @@ class OccupancyChartBox extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.all(30),
|
padding: const EdgeInsets.all(30),
|
||||||
decoration: containerWhiteDecoration,
|
decoration: containerWhiteDecoration,
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 20,
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@ -65,7 +64,9 @@ class OccupancyChartBox extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const Divider(height: 0),
|
const SizedBox(height: 20),
|
||||||
|
const Divider(),
|
||||||
|
const SizedBox(height: 20),
|
||||||
Expanded(child: OccupancyChart(chartData: state.chartData)),
|
Expanded(child: OccupancyChart(chartData: state.chartData)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -22,7 +22,6 @@ class OccupancyHeatMapBox extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.all(30),
|
padding: const EdgeInsets.all(30),
|
||||||
decoration: containerWhiteDecoration,
|
decoration: containerWhiteDecoration,
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 20,
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@ -66,7 +65,9 @@ class OccupancyHeatMapBox extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const Divider(height: 0),
|
const SizedBox(height: 20),
|
||||||
|
const Divider(),
|
||||||
|
const SizedBox(height: 20),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: OccupancyHeatMap(
|
child: OccupancyHeatMap(
|
||||||
heatMapData: state.heatMapData.asMap().map(
|
heatMapData: state.heatMapData.asMap().map(
|
||||||
|
@ -11,6 +11,8 @@ class AnalyticsErrorWidget extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Visibility(
|
return Visibility(
|
||||||
visible: errorMessage != null || (errorMessage?.isNotEmpty ?? false),
|
visible: errorMessage != null || (errorMessage?.isNotEmpty ?? false),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.only(bottom: 10),
|
||||||
child: Text(
|
child: Text(
|
||||||
errorMessage ?? 'Something went wrong',
|
errorMessage ?? 'Something went wrong',
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@ -21,6 +23,7 @@ class AnalyticsErrorWidget extends StatelessWidget {
|
|||||||
fontSize: 8,
|
fontSize: 8,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user