-
Notifications
You must be signed in to change notification settings - Fork 946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[historical view] Enable country panel for other time aggregates part 4 #4211
Conversation
language and aggregate
Unrelated, also disables the price graph for other aggregates
default option
switching between aggregates
other aggregations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor question :)
@@ -183,10 +183,11 @@ const reducer = (state = initialDataState, action) => { | |||
isLoadingHistories: false, | |||
histories: { | |||
...state.histories, | |||
[action.zoneId]: action.payload.map((datapoint) => ({ | |||
[action.zoneId]: action.payload.zoneStates.map((datapoint) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dunno if I missed this on the app-backend
, but did we change the response? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, should the mockserver be updated to match this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes so since we want some "metadata" on top, like stateAggregation and datetimes, it makes sense to have a level above it. Before it would just return an array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mockserver data also serves the zonesStates for history
// set index to the max of the range of selected time aggregate | ||
dispatchApplication('selectedZoneTimeIndex', TIME_TO_RANGE[aggregate.toUpperCase()] - 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! :)
@madsnedergaard ok so i've already found a few bugs, but I'll merge this one for now so we can merge this temp_branch |
* [historical view] Enable country panel for other time aggregates part 1 (#4208) * Add new helpers * Implement helpers * use helpers in timecontrols * Enable linting for formatting * [historical view] Enable country panel for other time aggregates part 2 (#4209) * Add new helpers * Implement helpers * use helpers in timecontrols * Enable timecontrols * timeaxis formats ticks depending on language and aggregate * [historical-view] Enable country panel for other time aggregates part 3 (#4210) * Add new helpers * Implement helpers * use helpers in timecontrols * Enable timecontrols * timeaxis formats ticks depending on language and aggregate * Adds new title component * Uses new countryPanel. Unrelated, also disables the price graph for other aggregates * Updates english translations using the default option * Updates all languages with automatic script * Add en examples * [historical view] Enable country panel for other time aggregates part 4 (#4211) * Add new helpers * Implement helpers * use helpers in timecontrols * Enable timecontrols * timeaxis formats ticks depending on language and aggregate * Adds new title component * Uses new countryPanel. Unrelated, also disables the price graph for other aggregates * Updates english translations using the default option * Updates all languages with automatic script * uses v5 history when feature enabled * Ensure timeindex is handled correctly when switching between aggregates * Ensure correct start and end date for graphs * Disable capacity mention in tooltip for other aggregations * use constant * Fix some bugs (#4224) * Add new helpers * Implement helpers * use helpers in timecontrols * Enable timecontrols * timeaxis formats ticks depending on language and aggregate * Adds new title component * Uses new countryPanel. Unrelated, also disables the price graph for other aggregates * Updates english translations using the default option * Updates all languages with automatic script * uses v5 history when feature enabled * Ensure timeindex is handled correctly when switching between aggregates * Ensure correct start and end date for graphs * Disable capacity mention in tooltip for other aggregations * use constant * Use 0 as start index when switching aggregates to guarantee that it works * Ensure map updates when switching aggregates * add all formats * Make areagraph adjust ticks correctly * Make timeslider adjust correctly * Adjust time to range temporarily to match incoming data * Ensure proper timeaxis frequency * Uses v5 datetimes, and makes sure that state is refetched * lint * Address comments * add loading * setting to null is not ideal but a bit better than 0
Since #4207 got quite big, I am splitting it out into some different milestone PRs on a temporary main branch
Important - Requires #4210 to be merged beforehand!
Description - Adjust graphs to production data
This PR updates the fetcher to call and use V5 history data and adjusts the graphs accordingly. So far this has only been tested on hourly and daily data. This should be the final PR for the temp_main branch.
(Note: there are some missing values in the tooltip and other places, which I have some pending changes on the app-backend to fix)
I had to slighly go into the datareducer, but just barely and there's no optimizations on how much it will call the backend, as we'll address that separately.
Preview
Screen.Recording.2022-05-31.at.16.08.47.mov