mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-27 23:24:56 +00:00
Merge branch 'dev' into 1511-occupancy-heat-map-tooltip
This commit is contained in:
@ -15,8 +15,9 @@ class OccupancyHeatMap extends StatelessWidget {
|
||||
static const _cellSize = 16.0;
|
||||
static const _totalWeeks = 53;
|
||||
|
||||
int get _maxValue =>
|
||||
heatMapData.isNotEmpty ? heatMapData.values.reduce(math.max) : 0;
|
||||
int get _maxValue => heatMapData.isNotEmpty
|
||||
? heatMapData.keys.map((key) => heatMapData[key] ?? 0).reduce(math.max)
|
||||
: 0;
|
||||
|
||||
DateTime _getStartingDate() {
|
||||
final jan1 = DateTime(DateTime.now().year, 1, 1);
|
||||
|
||||
@ -68,7 +68,10 @@ class OccupancyHeatMapBox extends StatelessWidget {
|
||||
Expanded(
|
||||
child: OccupancyHeatMap(
|
||||
heatMapData: state.heatMapData.asMap().map(
|
||||
(_, value) => MapEntry(value.date, value.occupancy),
|
||||
(_, value) => MapEntry(
|
||||
value.eventDate,
|
||||
value.countTotalPresenceDetected,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user