Dashboard Diagram Entität
As an API user I want to be able to visualize data based on my FilterHistory in specified date range, by using predefined data diagrams.
Diagrams cannot be fully defined via database, therefore the definition of diagrams should be in application logic (code).
Persistence will be used to store data about diagram types, connected FilterHistory and for user - diagram assignments.
There will be some structure in the code that will map respective data and diagram data generation logic to specific diagram type.
-
Entity DashboardDiagram is added (https://confluence.digitalearth-hgf.de/pages/viewpage.action?pageId=16716827) - fields marked with RO are read-only and are no part of persistence -
User - DashboardDiagram are related in 1 to many relation -
When DashboardDiagram is queried, fields marked with RO are generated based on diagram type (DashboardDiagram.type field) - hint: there could be some service that will use a factory to instantiate appropriate strategy, based on diagram type. This specific implementation would know required data and which repository / repository method to use to generate data
-
in addition to filter history, there should be additional criteria accepted from the request: dateTimeFrom and dateTimeTo - hint: custom GraphQl query can be specified with args 'dateTimeTo' and 'dateTimeFrom' and added on top of query builder. Custom query example (query "apply"): https://git.ufz.de/rdm/biome/api-base/-/blob/master/src/DTO/Filter.php
-
Diagram type CreatedInspections is implemented: -
count of created inspections per every single day in specified date range and according to connected FilterHistory -
displayType: "bar" -
title: "Inspections per Transect" -
xLabel: "Day" -
yLabel: "Count" -
dataSeries JSON format:
-
[
{"Day": 1, "Count": 54.8},
{"Day": 2, "Count": 112.1},
{"Day": 3, "Count": 63.6},
{"Day": 4, "Count": 37.6},
...
]
-
Tests
Review:
-
Entity DashboardDiagram is added (https://confluence.digitalearth-hgf.de/pages/viewpage.action?pageId=16716827) - fields marked with RO are read-only and are no part of persistence -
User - DashboardDiagram are related in 1 to many relation -
When DashboardDiagram is queried, fields marked with RO are generated based on diagram type (DashboardDiagram.type field) - hint: there could be some service that will use a factory to instantiate appropriate strategy, based on diagram type. This specific implementation would know required data and which repository / repository method to use to generate data
-
in addition to filter history, there should be additional criteria accepted from the request: dateTimeFrom and dateTimeTo - hint: custom GraphQl query can be specified with args 'dateTimeTo' and 'dateTimeFrom' and added on top of query builder. Custom query example (query "apply"): https://git.ufz.de/rdm/biome/api-base/-/blob/master/src/DTO/Filter.php
-
Diagram type CreatedInspections is implemented: -
count of created inspections per every single day in specified date range and according to connected FilterHistory -
displayType: "bar" -
title: "Inspections per Transect" -
xLabel: "Day" -
yLabel: "Count" -
dataSeries JSON format:
-
[
{"Day": 1, "Count": 54.8},
{"Day": 2, "Count": 112.1},
{"Day": 3, "Count": 63.6},
{"Day": 4, "Count": 37.6},
...
]
-
Tests
Edited by Michael Voigt