-
Notifications
You must be signed in to change notification settings - Fork 0
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
compare feature for one buiding, multiple time periods #283
Conversation
chart labels issue:
I think the reason this changes the chart label to energy type after editing, is to support the regular (non comparison) graphs, to make it clear to the user which energy type is which. So don't comment out or change this line until we can account for different use cases of comparison and non-comparison. |
BeforeAfter (data shifted left)Was able to figure out how to properly align data from different months. chart.module.js file makes API call to get data via meter_Groups.module.js So as far as just getting the data to be from different time periods we can do all of that in chart.module file in theory (although it may be better in the long run to rework block.module.js). Just need to figure out how to support more than 3 charts without vuex error, and how to connect the different time settings in chart.module.js to the edit_card form |
ScreenshotsInstructionsGo to a comparison URL with just one building in it, e.g. http://localhost:8080/#/compare/%5B%2216%22%5D/2 (or It is probably better to use the "one building in URL" approach, as if you had to change the URL every time you added a time period, that might force the page to refresh and cause unexpected behaviors. As shown in above screenshots, adjust start and end dates and then click "Save Time Period". Repeat for all time periods you want to save, then click "OK" at the end. |
BeforeAfterI was able to get the data shifted left by mapping the x-values of the charts to the x-values of the largest chart, similar to what was done before in chart.module but now it's done in chartController.vue. The original x-values of the charts are saved in a new variable in their data so that they can be used in linechart.js in order to display the proper date when hovering. The x-axis labels, bottom chart label, and line labels still need to be fixed, along with the issues mentioned above in the TODO. |
BeforeAfterThe time period comparison option will only display if there are less than two buildings selected (so 0 or 1 building). The compareStories array is passed to |
Moved mgID outside the if-statement, otherwise no error was caught when attempting to compare multiple time periods on buildings with no electricty data. Also added a check in navdir.vue so that the compare multiple time periods button won't show up if the building has no electricity data.
The issue was that there were conflicting instructions from the For now I set the See comments of commit for more details. Other minor changes are to address console warnings. |
For the second image there (multiple time periods, one building), I would suggest adding energy types, so that the labels go something like "October 1 to November 1, Net Energy Usage)" (example), in order to support multiple meters (and meter types) in the future. |
Added energy type to top chart labels. Delete time period is deleting some of the data but not the labels
Compare Meters Other Than Electricity and Measurements other than TotalIt's now possible to change the Meter type and Measurement. If time periods are added and the Meter/Measurement is changed, all data will be pulled based on whatever the Meter/Measurement is when "Ok" is hit. Different Meter/Measurement combos cannot be compared to each other right now. The card name will now also change based on the Meter type, this updates when in both compare view and single building view. |
…ix map prompt number of buildings
Stuff we didn't implement / maybe for future (include in email to Brandon and Ross)
minor (won't fix)
|
TODO:
Then we can merge PR and send email to Brandon / Ross with screenshots |
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 changes look good to me, I don't see any extra console.logs, irrelevant comments, or bugs.
Main TODO
Maybe should separate this out to separate GitHub Issues. Not exhaustive
Issue
#278