Open lepeuvedic opened 5 months ago
Fix has been implemented in commented out version of emissionsGroupByTime in EmissionTransformers. This prefills the timeKey array to match the datepicker values. This update will also need to be copied over to emissionsIntensityGroupByTime.
Waiting for real backend data to test this fully works before making release, test data always returns same time range so cannot validate properly.
Problem
When the UI is refreshed, which is often, the dates from the date range picker replace the dates from the back-end response in the global state vector. The result is an inconsistent display of data at the wrong date: a serious bug of the incorrect data kind.
The behaviour changed after a fix to the front end navigation.
How to Reproduce
Desired Behaviour
Since the back-end can supply serveral date ranges at once, the front end should also support several date ranges at different time scales. As a minimum first step the state vector variables storing the requested date range (filters) and the actual time range (from the response) shall be distinct.
The new /scenarios API has a zero parameter mode which returns data covering the entire available data history at the most suitable time step.
In a second step, the front-end should use the capability to request several time ranges at once to get data for all the charts on all the pages at once, and shall store the multiple data sets returned by the back-end.