diff --git a/src/App.vue b/src/App.vue index 81ba76d1c1e9d991a765799fa693572980068e9f..f9dd6b607452bfac2e964785b1b965a083f814cc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -60,7 +60,8 @@ export default { </div> <div class="bottom-section"> <MultiLineChart alt="NPK data line graph" v-if="npkData" :chart-data="npkData" :x-axis-data=pastSevenDaysData /> - <MultiAxisChart alt="Temperature Humidity Moisture data line multi-axis graph" v-if="thmData" :chart-data="thmData" :x-axis-data=pastSevenDaysData /> + <MultiAxisChart alt="Temperature Humidity Moisture data line multi-axis graph" v-if="thmData" :chart-data="thmData" + :x-axis-data=pastSevenDaysData /> </div> </div> </template> @@ -101,23 +102,26 @@ export default { justify-content: center; align-items: center; flex: 0.5; - gap: 10px; /* Adds a gap between the Graph components */ + gap: 10px; + /* Adds a gap between the Graph components */ } /* Responsive adjustments for mobile screens */ @media (max-width: 768px) { .bottom-section { - flex-direction: column; /* Stack the Graph components */ - gap: 0; /* Removes the gap when stacked vertically */ + flex-direction: column; + /* Stack the Graph components */ + gap: 0; + /* Removes the gap when stacked vertically */ } .logo-container img { - width: 50vw; /* Adjust logo size for smaller screens */ + width: 50vw; + /* Adjust logo size for smaller screens */ } .value-tabs-container { right: 10%; width: 80%; } -} -</style> +}</style> diff --git a/src/components/ValueTabs.vue b/src/components/ValueTabs.vue index 7915aaa6e63b6c44d64f98ce319f1179b7f5e46f..3fbe64c895ff4f6f06e97ccdd47a801d50679362 100644 --- a/src/components/ValueTabs.vue +++ b/src/components/ValueTabs.vue @@ -1,6 +1,6 @@ <script> - import axios from 'axios' - import * as bootstrap from 'bootstrap/dist/js/bootstrap' +import axios from 'axios' +import * as bootstrap from 'bootstrap/dist/js/bootstrap' export default { data() { @@ -45,45 +45,51 @@ export default { <div class="valueBox"> Nitrogen (N): <li class="list-group-item" - v-bind:class="getClass(values[0].N, this.rangeNPK[0], this.rangeNPK[1], this.rangeNPK[2], this.rangeNPK[3])" - data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeNPK[1] + '-' + this.rangeNPK[2]">{{ values[0].N }} ppm</li> + v-bind:class="getClass(values[0].N, this.rangeNPK[0], this.rangeNPK[1], this.rangeNPK[2], this.rangeNPK[3])" + data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeNPK[1] + '-' + this.rangeNPK[2]">{{ + values[0].N }} ppm</li> </div> <div class="valueBox"> Phosphorus (P): <li class="list-group-item" - v-bind:class="getClass(values[1].P, this.rangeNPK[0], this.rangeNPK[1], this.rangeNPK[2], this.rangeNPK[3])" - data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeNPK[1] + '-' + this.rangeNPK[2]">{{ values[1].P }} ppm</li> + v-bind:class="getClass(values[1].P, this.rangeNPK[0], this.rangeNPK[1], this.rangeNPK[2], this.rangeNPK[3])" + data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeNPK[1] + '-' + this.rangeNPK[2]">{{ + values[1].P }} ppm</li> </div> <div class="valueBox"> Potassium (K): <li class="list-group-item" - v-bind:class="getClass(values[2].K, this.rangeNPK[0], this.rangeNPK[1], this.rangeNPK[2], this.rangeNPK[3])" - data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeNPK[1] + '-' + this.rangeNPK[2]">{{ values[2].K }} ppm</li> + v-bind:class="getClass(values[2].K, this.rangeNPK[0], this.rangeNPK[1], this.rangeNPK[2], this.rangeNPK[3])" + data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeNPK[1] + '-' + this.rangeNPK[2]">{{ + values[2].K }} ppm</li> </div> <div class="valueBox"> Temperature: <li class="list-group-item" - v-bind:class="getClass(values[3].T, this.rangeT[0], this.rangeT[1], this.rangeT[2], this.rangeT[3])" - data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeT[1] + '-' + this.rangeT[2]">{{ values[3].T }} °C</li> + v-bind:class="getClass(values[3].T, this.rangeT[0], this.rangeT[1], this.rangeT[2], this.rangeT[3])" + data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeT[1] + '-' + this.rangeT[2]">{{ + values[3].T }} °C</li> </div> <div class="valueBox"> Humidity: <li class="list-group-item" - v-bind:class="getClass(values[4].H, this.rangeHM[0], this.rangeHM[1], this.rangeHM[2], this.rangeHM[3])" - data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeHM[1] + '-' + this.rangeHM[2]">{{ values[4].H }} %</li> + v-bind:class="getClass(values[4].H, this.rangeHM[0], this.rangeHM[1], this.rangeHM[2], this.rangeHM[3])" + data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeHM[1] + '-' + this.rangeHM[2]">{{ + values[4].H }} %</li> </div> <div class="valueBox"> Moisture: <li class="list-group-item" - v-bind:class="getClass(values[5].M, this.rangeHM[0], this.rangeHM[1], this.rangeHM[2], this.rangeHM[3])" - data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeHM[1] + '-' + this.rangeHM[2]">{{ values[5].M }} %</li> + v-bind:class="getClass(values[5].M, this.rangeHM[0], this.rangeHM[1], this.rangeHM[2], this.rangeHM[3])" + data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeHM[1] + '-' + this.rangeHM[2]">{{ + values[5].M }} %</li> </div> </div> </div> </template> <style scoped> -.allBoxes{ +.allBoxes { /* font-size: 40px; */ font-size: 2vw; width: fit-content; @@ -97,8 +103,7 @@ export default { /* Responsive adjustments for mobile screens */ @media (max-width: 768px) { - .allBoxes{ + .allBoxes { font-size: 1.6vh; } -} -</style> +}</style>