Skip to content

Commit

Permalink
Render Total GHG Emissions in Historical Data
Browse files Browse the repository at this point in the history
  • Loading branch information
vkoves committed Jun 5, 2024
1 parent 73538a8 commit c1dabfd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/HistoricalBuildingDataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<th scope="col">
GHG Intensity <span class="unit">kg CO<sub>2</sub>e / sqft</span>
</th>
<th scope="col">
GHG Emissions <span class="unit">metric tons CO<sub>2</sub>e</span>
</th>
<th scope="col">
Source EUI <span class="unit">kBtu / sqft</span>
</th>
Expand Down Expand Up @@ -61,6 +64,7 @@
{{ benchmark.ENERGYSTARScore || '-' }}
</td>
<td>{{ benchmark.GHGIntensity }}</td>
<td>{{ benchmark.TotalGHGEmissions | optionalFloat }}</td>
<td>{{ benchmark.SourceEUI }}</td>

<!-- Round big numbers -->
Expand Down Expand Up @@ -99,6 +103,14 @@ import {IHistoricData} from '../common-functions.vue';
return parseInt(value).toLocaleString();
},
optionalFloat(value: string) {
if (!value) {
return '-';
}
return parseFloat(value).toLocaleString();
},
},
})
export default class BuildingImage extends Vue {
Expand Down
1 change: 1 addition & 0 deletions src/templates/BuildingDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ query ($id: ID!, $ID: String) {
ENERGYSTARScore
SourceEUI
GHGIntensity
TotalGHGEmissions
ElectricityUse
NaturalGasUse
DistrictSteamUse
Expand Down

0 comments on commit c1dabfd

Please sign in to comment.