Skip to content

Commit 5152cfc

Browse files
committed
Update PowerEnergyChart.vue
1 parent 5dfed6c commit 5152cfc

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

components/Charts/PowerEnergyChart.vue

+8-7
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@
4949
@date-axis="(visible) => showDateAxis = visible"
5050
/>
5151

52-
<div
53-
v-if="isTypeGrowthStackedArea"
54-
style="position: absolute; top: 3rem; left: 3rem; font-style: italic;">
55-
{{ growthDataset.length }}
56-
</div>
57-
5852
<stacked-area-vis
5953
v-if="chartShown && (isTypeGrowthStackedArea)"
6054
:read-only="readOnly"
@@ -1091,6 +1085,14 @@ export default {
10911085
10921086
mounted() {
10931087
this.visHeight = this.chartHeight
1088+
1089+
if (this.isTypeGrowthStackedArea) {
1090+
this.growthDataset = this.zoomExtent.length > 0 ? this.getGrowthDataset().filter((d) => {
1091+
return d.date >= this.zoomExtent[0] && d.date < this.zoomExtent[1]
1092+
}) : this.getGrowthDataset()
1093+
1094+
console.log('growthDataset powerEnergyDataset', this.growthDataset)
1095+
}
10941096
},
10951097
10961098
methods: {
@@ -1212,7 +1214,6 @@ export default {
12121214
} else {
12131215
obj[ftId] = d[ftId] - this.powerEnergyDataset[i - 1][ftId]
12141216
}
1215-
12161217
})
12171218
12181219
dataset.push(obj)

0 commit comments

Comments
 (0)