bugfix4.4
This commit is contained in:
@@ -28,19 +28,10 @@ function SO2(props) {
|
||||
);
|
||||
const options = getOptions("SO2_float", period, currentTrend);
|
||||
|
||||
function handleSwitch(v) {
|
||||
// console.log('switched ', v);
|
||||
}
|
||||
function handleSwitch(v) {}
|
||||
|
||||
function handleDateChange(value) {
|
||||
setPeriod(
|
||||
{
|
||||
日: "day",
|
||||
周: "week",
|
||||
月: "month",
|
||||
年: "year",
|
||||
}[value]
|
||||
);
|
||||
setPeriod(value);
|
||||
setTimestr(
|
||||
{
|
||||
日:
|
||||
@@ -75,22 +66,12 @@ function SO2(props) {
|
||||
defaultSelect={period}
|
||||
onSwitch={handleSwitch}
|
||||
dateOptions={["日", "周", "月", "年"]}
|
||||
// legend={["总量", "白班", "夜班"]}
|
||||
onDateChange={handleDateChange}
|
||||
size={["long", "middle"]}
|
||||
>
|
||||
{/* real echarts here */}
|
||||
{options && (
|
||||
<ReactECharts
|
||||
key={Math.random()}
|
||||
// option={getOptions(
|
||||
// [
|
||||
// [132, 155, 140, 83, 180, 67, 136],
|
||||
// [83, 58, 60, 22, 80, 64, 43],
|
||||
// [49, 97, 80, 61, 100, 3, 93],
|
||||
// ],
|
||||
// '氧气',
|
||||
// )}
|
||||
option={options}
|
||||
style={{ height: "100%" }}
|
||||
/>
|
||||
@@ -108,7 +89,6 @@ function SO2(props) {
|
||||
暂无数据
|
||||
</p>
|
||||
)}
|
||||
{/* real table data here */}
|
||||
</GraphBase>
|
||||
);
|
||||
}
|
||||
@@ -126,16 +106,6 @@ function getOptions(source, period, trend) {
|
||||
grid: { top: 40, right: 12, bottom: 20, left: 64 },
|
||||
xAxis: {
|
||||
type: "category",
|
||||
// data: Array(7)
|
||||
// .fill(1)
|
||||
// .map((_, index) => {
|
||||
// const today = new Date();
|
||||
// const dtimestamp = today - index * 24 * 60 * 60 * 1000;
|
||||
// return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
|
||||
// dtimestamp
|
||||
// ).getDate()}`;
|
||||
// })
|
||||
// .reverse(),
|
||||
data: trend[source].map((item) => item.time),
|
||||
axisLabel: {
|
||||
color: "#fff",
|
||||
@@ -173,9 +143,6 @@ function getOptions(source, period, trend) {
|
||||
color: "#213259a0",
|
||||
},
|
||||
},
|
||||
// interval: 10,
|
||||
// min: 0,
|
||||
// max: 100,
|
||||
},
|
||||
series: [
|
||||
{
|
||||
@@ -194,40 +161,7 @@ function getOptions(source, period, trend) {
|
||||
{ offset: 1, color: "#FFD16010" },
|
||||
]),
|
||||
},
|
||||
// smooth: true,
|
||||
},
|
||||
// {
|
||||
// data: Array(7)
|
||||
// .fill(1)
|
||||
// .map((_) => {
|
||||
// return randomInt(60, 100);
|
||||
// }),
|
||||
// type: "line",
|
||||
// areaStyle: {
|
||||
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
// { offset: 0, color: "#12FFF540" },
|
||||
// { offset: 0.5, color: "#12FFF520" },
|
||||
// { offset: 1, color: "#12FFF510" },
|
||||
// ]),
|
||||
// },
|
||||
// // smooth: true,
|
||||
// },
|
||||
// {
|
||||
// data: Array(7)
|
||||
// .fill(1)
|
||||
// .map((_) => {
|
||||
// return randomInt(60, 100);
|
||||
// }),
|
||||
// type: "line",
|
||||
// areaStyle: {
|
||||
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
// { offset: 0, color: "#2760FF40" },
|
||||
// { offset: 0.5, color: "#2760FF20" },
|
||||
// { offset: 1, color: "#2760FF10" },
|
||||
// ]),
|
||||
// },
|
||||
// // smooth: true,
|
||||
// },
|
||||
],
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
@@ -235,7 +169,6 @@ function getOptions(source, period, trend) {
|
||||
type: "shadow",
|
||||
},
|
||||
className: "xc-chart-tooltip",
|
||||
// backgroundColor: ''
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user