Skip to content

Commit

Permalink
Merge pull request #106 from vkoves/add-total-ghg-emissions-to-histor…
Browse files Browse the repository at this point in the history
…ical

Render Total GHG Emissions in Historical Data
  • Loading branch information
vkoves authored Jun 12, 2024
2 parents 115139b + c1dabfd commit fd4f7e8
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 fd4f7e8

Please sign in to comment.