Closed danrademacher closed 2 years ago
/src/app/templates/scorecards/charts/fueluse.html
and /src/app/views/scorecards/charts/fueluse.js
./charts/fueluse
in /src/app/views/scorecards/building_scorecard.js
/src/app/templates/scorecards/charts/performance_standard.html
./charts/performance_standard
in /src/app/views/scorecards/building_scorecard.js
I don't think anchor links are going to work out of the box, the Backbone router takes over and tries to load http://localhost:8080/#performance-standard-chart
With some work and R&D there could be a solution hacking the router, as shown here https://stackoverflow.com/a/11675858
Update: this has been fixed in #18
When cbps_flag is TRUE but cbps_euit is blank, hide the chart and show this message:
We could not estimate an EUI Target for this building with the reported data. Contact energybenchmarking@seattle.gov if you have questions.
Forgot to note in the original issue that everything about the CBPS shows only for buildings where cbps_flag
is true. If that flag is false, then the whole alert and the whole block, including title and everything should be hidden
Hiding the chart and showing the message when EUI and EUIt is missing is more complex than I realized. Roughly like this:
Only I didn't have time to deal with font styles on the message. But I did hide the useless EUI box beside the date
Most commons is where cbps_flag is FALSE and all mention of this whole program should be hidden, like it doesn’t exist
Less common, where the cbps_flag is TRUE but the city lacks data to set the target
When the building EUI is below the EUIt, make the bar be green:
Meets target:
Doesn't meet target:
This comes after #5 and #4. It's also a bigger chunk of work, but important to get it on the page so we can suss out data gaps and edges.
Main section:![image](https://user-images.githubusercontent.com/1423200/144132511-38c65afd-1895-4896-9444-cfddd1eedb46.png)
Alert above:![image](https://user-images.githubusercontent.com/1423200/144132562-c4666c1d-72a0-4236-b23d-69c57f7f9f86.png)
Note that the anchor link in the alert ties to the section below.
https://xd.adobe.com/view/fc56a1c7-ec9e-46c9-a352-63b9f05e276a-a905/
Terry will provide a text alert to replace the bar chart when a building has no EUI and thus no EUIt. Something like "Performance data not available for this building."
┆Issue is synchronized with this Asana task