update
This commit is contained in:
@@ -45,19 +45,34 @@ function SO2(props) {
|
||||
size={["long", "middle"]}
|
||||
>
|
||||
{/* real echarts here */}
|
||||
<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%" }}
|
||||
/>
|
||||
{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%" }}
|
||||
/>
|
||||
)}
|
||||
{!options && (
|
||||
<p
|
||||
style={{
|
||||
color: "#cccf",
|
||||
fontSize: "24px",
|
||||
userSelect: "none",
|
||||
textAlign: "center",
|
||||
paddingTop: "96px",
|
||||
}}
|
||||
>
|
||||
暂无数据
|
||||
</p>
|
||||
)}
|
||||
{/* real table data here */}
|
||||
</GraphBase>
|
||||
);
|
||||
@@ -66,6 +81,7 @@ function SO2(props) {
|
||||
export default SO2;
|
||||
|
||||
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