update
This commit is contained in:
@@ -46,19 +46,34 @@ function Oxygen(props) {
|
||||
size={["long", "middle"]}
|
||||
>
|
||||
{/* real echarts here */}
|
||||
<ReactECharts
|
||||
key={Math.random()}
|
||||
option={options}
|
||||
// option={getOptions(
|
||||
// [
|
||||
// [172, 165, 135, 35, 101, 53, 68], // 总量
|
||||
// [87, 68, 81, 33, 35, 44, 38], // 白班
|
||||
// [85, 97, 54, 2, 66, 9, 30], // 夜班
|
||||
// ],
|
||||
// "氧气"
|
||||
// )}
|
||||
style={{ height: "100%" }}
|
||||
/>
|
||||
{options && (
|
||||
<ReactECharts
|
||||
key={Math.random()}
|
||||
option={options}
|
||||
// option={getOptions(
|
||||
// [
|
||||
// [172, 165, 135, 35, 101, 53, 68], // 总量
|
||||
// [87, 68, 81, 33, 35, 44, 38], // 白班
|
||||
// [85, 97, 54, 2, 66, 9, 30], // 夜班
|
||||
// ],
|
||||
// "氧气"
|
||||
// )}
|
||||
style={{ height: "100%" }}
|
||||
/>
|
||||
)}
|
||||
{!options && (
|
||||
<p
|
||||
style={{
|
||||
color: "#cccf",
|
||||
fontSize: "24px",
|
||||
userSelect: "none",
|
||||
textAlign: "center",
|
||||
paddingTop: "96px",
|
||||
}}
|
||||
>
|
||||
暂无数据
|
||||
</p>
|
||||
)}
|
||||
{/* real table data here */}
|
||||
</GraphBase>
|
||||
);
|
||||
@@ -67,6 +82,7 @@ function Oxygen(props) {
|
||||
export default Oxygen;
|
||||
|
||||
function getOptions(source, period, trend) {
|
||||
if (trend[source].length == 0) return null;
|
||||
return {
|
||||
color: ["#FFD160", "#12FFF5", "#2760FF"],
|
||||
grid: { top: 38, right: 12, bottom: 20, left: 48 },
|
||||
|
||||
Reference in New Issue
Block a user