fix ui
This commit is contained in:
@@ -115,7 +115,7 @@ function getOptions(period, trend) {
|
||||
.fill(1)
|
||||
.map((_, index) => {
|
||||
if (period == "week") {
|
||||
const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000;
|
||||
const dtimestamp = today - (index + 1) * 24 * 60 * 60 * 1000;
|
||||
return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
|
||||
dtimestamp
|
||||
).getDate()}`;
|
||||
@@ -166,6 +166,8 @@ function getOptions(period, trend) {
|
||||
series: {
|
||||
data: trend[period],
|
||||
type: "line",
|
||||
symbol: "circle",
|
||||
symbolSize: 6,
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: colors[0] + "40" },
|
||||
@@ -188,6 +190,11 @@ function getOptions(period, trend) {
|
||||
// })),
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "shadow",
|
||||
},
|
||||
className: "xc-chart-tooltip",
|
||||
// backgroundColor: ''
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -36,13 +36,15 @@ function ElecCost(props) {
|
||||
size={["long", "middle"]}
|
||||
>
|
||||
{/* real echarts here */}
|
||||
{ options && <ReactECharts
|
||||
key={Math.random()}
|
||||
option={options}
|
||||
// option={getOptions([[112, 73, 79, 82, 30, 105, 87]], "氧气")}
|
||||
style={{ height: "100%" }}
|
||||
/>}
|
||||
{!options && (
|
||||
{options && (
|
||||
<ReactECharts
|
||||
key={Math.random()}
|
||||
option={options}
|
||||
// option={getOptions([[112, 73, 79, 82, 30, 105, 87]], "氧气")}
|
||||
style={{ height: "100%" }}
|
||||
/>
|
||||
)}
|
||||
{!options && (
|
||||
<p
|
||||
style={{
|
||||
color: "#cccf",
|
||||
@@ -147,6 +149,8 @@ function getOptions(period, trend) {
|
||||
series: {
|
||||
data: trend[period].map((item) => item.qty),
|
||||
type: "line",
|
||||
symbol: "circle",
|
||||
symbolSize: 6,
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: colors[0] + "40" },
|
||||
@@ -169,6 +173,11 @@ function getOptions(period, trend) {
|
||||
// })),
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "shadow",
|
||||
},
|
||||
className: "xc-chart-tooltip",
|
||||
// backgroundColor: ''
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ function Energy(props) {
|
||||
<span
|
||||
className={cls.shadowBorder + " " + cls.infoText}
|
||||
style={{
|
||||
fontSize: "22px",
|
||||
fontSize: "24px",
|
||||
lineHeight: "1.5",
|
||||
gridRow: "1 / 3",
|
||||
}}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
.infoText {
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
font-size: 24px;
|
||||
line-height: 2.5;
|
||||
/* line-height: 20px; */
|
||||
letter-spacing: 1px;
|
||||
@@ -27,4 +27,5 @@
|
||||
|
||||
.infoText > span:last-child {
|
||||
color: #00FFF7;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
@@ -143,6 +143,8 @@ function getOptions(source, period, trend) {
|
||||
{
|
||||
data: trend[source].map((item) => item.value),
|
||||
type: "line",
|
||||
symbol: "circle",
|
||||
symbolSize: 6,
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: "#FFD16040" },
|
||||
@@ -187,6 +189,11 @@ function getOptions(source, period, trend) {
|
||||
],
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "shadow",
|
||||
},
|
||||
className: "xc-chart-tooltip",
|
||||
// backgroundColor: ''
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -165,6 +165,8 @@ function getOptions(period, trend) {
|
||||
series: {
|
||||
data: trend[period],
|
||||
type: "line",
|
||||
symbol: "circle",
|
||||
symbolSize: 6,
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: colors[0] + "40" },
|
||||
@@ -187,6 +189,11 @@ function getOptions(period, trend) {
|
||||
// })),
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "shadow",
|
||||
},
|
||||
className: "xc-chart-tooltip",
|
||||
// backgroundColor: ''
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -143,6 +143,8 @@ function getOptions(source, period, trend) {
|
||||
{
|
||||
data: trend[source].map((item) => item.value),
|
||||
type: "line",
|
||||
symbol: "circle",
|
||||
symbolSize: 6,
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: "#FFD16040" },
|
||||
@@ -187,6 +189,11 @@ function getOptions(source, period, trend) {
|
||||
],
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "shadow",
|
||||
},
|
||||
className: "xc-chart-tooltip",
|
||||
// backgroundColor: ''
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -142,6 +142,8 @@ function getOptions(source, period, trend) {
|
||||
{
|
||||
data: trend[source].map((item) => item.value),
|
||||
type: "line",
|
||||
symbol: "circle",
|
||||
symbolSize: 6,
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: "#FFD16040" },
|
||||
@@ -186,6 +188,11 @@ function getOptions(source, period, trend) {
|
||||
],
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "shadow",
|
||||
},
|
||||
className: "xc-chart-tooltip",
|
||||
// backgroundColor: ''
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ function SmokeHandle(props) {
|
||||
</span>
|
||||
</span>
|
||||
<span className={cls.shadowBorder + " " + cls.infoText}>
|
||||
<span style={{ lineHeight: 1.5 }}>颗 粒 物 浓 度:</span>{" "}
|
||||
<span style={{ lineHeight: 1.5 }}>颗 粒 物 浓 度</span>{" "}
|
||||
<span style={{ lineHeight: 1.5 }}>
|
||||
{smokeInfo?.dust_float || 0}mg/m³
|
||||
</span>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
.infoText {
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
font-size: 24px;
|
||||
line-height: 2.5;
|
||||
/* line-height: 20px; */
|
||||
letter-spacing: 1px;
|
||||
@@ -28,4 +28,5 @@
|
||||
|
||||
.infoText > span:last-child {
|
||||
color: #00fff7;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user