fix responsive issue with the tempchart
Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
1 parent
502b5ac7c1
commit
d1d84953a1
2 files changed
+69
-13
No files matched your search
@@ -91,15 +91,16 @@ export default {
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top: 10,
|
||||
right: 40,
|
||||
top: 30,
|
||||
right: 25,
|
||||
bottom: 20,
|
||||
left: 40,
|
||||
left: 25,
|
||||
},
|
||||
xAxis: {
|
||||
type: 'time',
|
||||
min: new Date() - 60*10,
|
||||
max: new Date(),
|
||||
minInterval: 60 * 2 * 1000 + 1,
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
@@ -107,16 +108,24 @@ export default {
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
color: 'rgba(255, 255, 255, 0.24)'
|
||||
color: 'rgba(255, 255, 255, 0.24)',
|
||||
margin: 10
|
||||
},
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
name: 'Celsius',
|
||||
type: 'value',
|
||||
min: 0,
|
||||
max: 300,
|
||||
minInterval: 10,
|
||||
maxInterval: 50,
|
||||
maxInterval: 100,
|
||||
nameLocation: 'end',
|
||||
nameGap: 5,
|
||||
nameTextStyle: {
|
||||
color: 'rgba(255, 255, 255, 0.24)',
|
||||
align: 'left',
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(255, 255, 255, 0.12)',
|
||||
@@ -124,7 +133,10 @@ export default {
|
||||
},
|
||||
axisLabel: {
|
||||
color: 'rgba(255, 255, 255, 0.24)',
|
||||
formatter: '{value}°'
|
||||
formatter: '{value}',
|
||||
rotate: 90,
|
||||
showMaxLabel: false,
|
||||
margin: 5,
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
@@ -134,16 +146,25 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'PWM',
|
||||
min: 0,
|
||||
max: 100,
|
||||
minInterval: 25,
|
||||
minInterval: 100,
|
||||
type: 'value',
|
||||
nameLocation: 'end',
|
||||
nameGap: 5,
|
||||
nameTextStyle: {
|
||||
color: 'rgba(255, 255, 255, 0.24)',
|
||||
align: 'right',
|
||||
},
|
||||
splitLine: {
|
||||
show: false,
|
||||
},
|
||||
axisLabel: {
|
||||
color: 'rgba(255, 255, 255, 0.24)',
|
||||
formatter: '{value}%'
|
||||
formatter: '{value}',
|
||||
rotate: 90,
|
||||
margin: 5,
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
@@ -153,7 +174,42 @@ export default {
|
||||
}
|
||||
},
|
||||
],
|
||||
series: []
|
||||
series: [],
|
||||
media: [{
|
||||
query: {
|
||||
minWidth: 500,
|
||||
},
|
||||
option: {
|
||||
xAxis: {
|
||||
minInterval: 60 * 1000 + 1,
|
||||
}
|
||||
}
|
||||
}, {
|
||||
query: {
|
||||
minWidth: 680,
|
||||
},
|
||||
option: {
|
||||
grid: {
|
||||
right: 40,
|
||||
left: 40,
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
maxInterval: 50,
|
||||
showMaxLabel: true,
|
||||
axisLabel: {
|
||||
rotate: 0
|
||||
}
|
||||
},
|
||||
{
|
||||
maxInterval: 25,
|
||||
axisLabel: {
|
||||
rotate: 0
|
||||
}
|
||||
},
|
||||
],
|
||||
}
|
||||
}],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<v-icon :color="heater.color">mdi-{{ heater.icon }}</v-icon>
|
||||
</v-col>
|
||||
<v-col class="py-2 font-weight-bold"><span style="cursor: pointer;" @click="openHeater(heater)">{{ convertName(heater.name) }}</span></v-col>
|
||||
<v-col class="py-2 flex-grow-0 text-center" style="min-width: 70px;">
|
||||
<v-col class="py-2 flex-grow-0 text-center d-none d-sm-block" style="min-width: 70px;">
|
||||
<div :style="'background-color: '+heater.chartColor+'66; border-color: '+heater.chartColor+'; cursor: pointer;'" class="datasetColorSymbol d-inline-block" @click="openHeater(heater)"></div>
|
||||
</v-col>
|
||||
<v-col class="py-2 text-center d-none d-sm-block"><small>{{ heater.target > 0 ? (heater.power !== null ? (heater.power > 0 ? (heater.power * 100).toFixed(0)+'%' : "0%") : "active") : "off" }}</small></v-col>
|
||||
@@ -107,7 +107,7 @@
|
||||
<v-icon :color="(fan.target ? 'grey lighten-5' : 'grey darken-2')" :class="(fan.speed ? ' icon-rotate' : '')">mdi-fan</v-icon>
|
||||
</v-col>
|
||||
<v-col class="py-2 font-weight-bold"><span style="cursor: pointer;" @click="openHeater(fan)">{{ convertName(fan.name) }}</span></v-col>
|
||||
<v-col class="py-2 flex-grow-0 text-center" style="min-width: 70px;">
|
||||
<v-col class="py-2 flex-grow-0 text-center d-none d-sm-block" style="min-width: 70px;">
|
||||
<div :style="'background-color: '+fan.chartColor+'66; border-color: '+fan.chartColor+'; cursor: pointer;'" class="datasetColorSymbol d-inline-block" @click="openHeater(fan)"></div>
|
||||
</v-col>
|
||||
<v-col class="py-2 text-center d-none d-sm-block"><small>{{ fan.target > 0 && fan.speed > 0 ? (fan.speed * 100).toFixed(0)+"%" : (fan.target > 0 ? "standby" : "off") }}</small></v-col>
|
||||
@@ -129,7 +129,7 @@
|
||||
<v-col class="py-2 font-weight-bold">
|
||||
<span style="cursor: pointer;" @click="openHeater(sensor)">{{ convertName(sensor.name) }}</span>
|
||||
</v-col>
|
||||
<v-col class="py-2 flex-grow-0 text-center" style="min-width: 70px;">
|
||||
<v-col class="py-2 flex-grow-0 text-center d-none d-sm-block" style="min-width: 70px;">
|
||||
<div :style="'background-color: '+sensor.chartColor+'66; border-color: '+sensor.chartColor+'; cursor: pointer;'" class="datasetColorSymbol d-inline-block" @click="openHeater(sensor)"></div>
|
||||
</v-col>
|
||||
<v-col class="py-2 d-none d-sm-block"><span> </span></v-col>
|
||||
@@ -152,7 +152,7 @@
|
||||
</div>
|
||||
<v-divider class="my-2" v-if="boolTempchart"></v-divider>
|
||||
<v-row v-if="boolTempchart">
|
||||
<v-col class="py-5 px-5">
|
||||
<v-col class="py-0 px-3">
|
||||
<temp-chart ></temp-chart>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
Reference in new issue
Block a user