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

Volar formatting

parent 88b91887
No related branches found
No related tags found
1 merge request!6Tooltips + Formatting
...@@ -60,7 +60,8 @@ export default { ...@@ -60,7 +60,8 @@ export default {
</div> </div>
<div class="bottom-section"> <div class="bottom-section">
<MultiLineChart alt="NPK data line graph" v-if="npkData" :chart-data="npkData" :x-axis-data=pastSevenDaysData /> <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>
</div> </div>
</template> </template>
...@@ -101,23 +102,26 @@ export default { ...@@ -101,23 +102,26 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex: 0.5; 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 */ /* Responsive adjustments for mobile screens */
@media (max-width: 768px) { @media (max-width: 768px) {
.bottom-section { .bottom-section {
flex-direction: column; /* Stack the Graph components */ flex-direction: column;
gap: 0; /* Removes the gap when stacked vertically */ /* Stack the Graph components */
gap: 0;
/* Removes the gap when stacked vertically */
} }
.logo-container img { .logo-container img {
width: 50vw; /* Adjust logo size for smaller screens */ width: 50vw;
/* Adjust logo size for smaller screens */
} }
.value-tabs-container { .value-tabs-container {
right: 10%; right: 10%;
width: 80%; width: 80%;
} }
} }</style>
</style>
<script> <script>
import axios from 'axios' import axios from 'axios'
import * as bootstrap from 'bootstrap/dist/js/bootstrap' import * as bootstrap from 'bootstrap/dist/js/bootstrap'
export default { export default {
data() { data() {
...@@ -45,45 +45,51 @@ export default { ...@@ -45,45 +45,51 @@ export default {
<div class="valueBox"> <div class="valueBox">
Nitrogen (N):&nbsp; Nitrogen (N):&nbsp;
<li class="list-group-item" <li class="list-group-item"
v-bind:class="getClass(values[0].N, this.rangeNPK[0], this.rangeNPK[1], this.rangeNPK[2], this.rangeNPK[3])" 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> data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeNPK[1] + '-' + this.rangeNPK[2]">{{
values[0].N }} ppm</li>
</div> </div>
<div class="valueBox"> <div class="valueBox">
Phosphorus (P):&nbsp; Phosphorus (P):&nbsp;
<li class="list-group-item" <li class="list-group-item"
v-bind:class="getClass(values[1].P, this.rangeNPK[0], this.rangeNPK[1], this.rangeNPK[2], this.rangeNPK[3])" 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> data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeNPK[1] + '-' + this.rangeNPK[2]">{{
values[1].P }} ppm</li>
</div> </div>
<div class="valueBox"> <div class="valueBox">
Potassium (K):&nbsp; Potassium (K):&nbsp;
<li class="list-group-item" <li class="list-group-item"
v-bind:class="getClass(values[2].K, this.rangeNPK[0], this.rangeNPK[1], this.rangeNPK[2], this.rangeNPK[3])" 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> data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeNPK[1] + '-' + this.rangeNPK[2]">{{
values[2].K }} ppm</li>
</div> </div>
<div class="valueBox"> <div class="valueBox">
Temperature:&nbsp; Temperature:&nbsp;
<li class="list-group-item" <li class="list-group-item"
v-bind:class="getClass(values[3].T, this.rangeT[0], this.rangeT[1], this.rangeT[2], this.rangeT[3])" 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> data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeT[1] + '-' + this.rangeT[2]">{{
values[3].T }} °C</li>
</div> </div>
<div class="valueBox"> <div class="valueBox">
Humidity:&nbsp; Humidity:&nbsp;
<li class="list-group-item" <li class="list-group-item"
v-bind:class="getClass(values[4].H, this.rangeHM[0], this.rangeHM[1], this.rangeHM[2], this.rangeHM[3])" 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> data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeHM[1] + '-' + this.rangeHM[2]">{{
values[4].H }} %</li>
</div> </div>
<div class="valueBox"> <div class="valueBox">
Moisture:&nbsp; Moisture:&nbsp;
<li class="list-group-item" <li class="list-group-item"
v-bind:class="getClass(values[5].M, this.rangeHM[0], this.rangeHM[1], this.rangeHM[2], this.rangeHM[3])" 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> data-bs-toggle="tooltip" :data-bs-title="'Ideal conditions ' + this.rangeHM[1] + '-' + this.rangeHM[2]">{{
values[5].M }} %</li>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<style scoped> <style scoped>
.allBoxes{ .allBoxes {
/* font-size: 40px; */ /* font-size: 40px; */
font-size: 2vw; font-size: 2vw;
width: fit-content; width: fit-content;
...@@ -97,8 +103,7 @@ export default { ...@@ -97,8 +103,7 @@ export default {
/* Responsive adjustments for mobile screens */ /* Responsive adjustments for mobile screens */
@media (max-width: 768px) { @media (max-width: 768px) {
.allBoxes{ .allBoxes {
font-size: 1.6vh; font-size: 1.6vh;
} }
} }</style>
</style>
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