Skip to content
Snippets Groups Projects
Commit 130a1380 authored by Wortman, Elliot (UG - Comp Sci & Elec Eng)'s avatar Wortman, Elliot (UG - Comp Sci & Elec Eng)
Browse files

Modify passing x-axis-data as refering to function was causing errors in production build

Error was "this is not defined", did not occur in dev environment
parent 47d3a237
No related branches found
No related tags found
2 merge requests!5Replace Vue3 template site with NanoPatch UI & API,!4Modify passing x-axis-data as refering to function was causing errors in production build
......@@ -15,6 +15,9 @@ export default {
mounted() {
this.getPastValues();
},
created() {
this.pastSevenDaysData = this.getPastSevenDays();
},
methods: {
getPastValues() {
axios
......@@ -37,6 +40,7 @@ export default {
},
data() {
return {
pastSevenDaysData: [],
npkData: null,
thmData: null
}
......@@ -55,8 +59,8 @@ export default {
</div>
</div>
<div class="bottom-section">
<MultiLineChart v-if="npkData" :chart-data="npkData" :x-axis-data=this.getPastSevenDays() />
<MultiAxisChart v-if="thmData" :chart-data="thmData" :x-axis-data=this.getPastSevenDays() />
<MultiLineChart v-if="npkData" :chart-data="npkData" :x-axis-data=pastSevenDaysData />
<MultiAxisChart v-if="thmData" :chart-data="thmData" :x-axis-data=pastSevenDaysData />
</div>
</div>
</template>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment