update
This commit is contained in:
@@ -82,7 +82,20 @@ const SmokeTrendChart = (props) => {
|
||||
</Radio.Button>
|
||||
</Radio.Group>
|
||||
</div>
|
||||
<ReactECharts option={options} style={{ height: "240px" }} />
|
||||
{options && <ReactECharts option={options} style={{ height: "240px" }} />}
|
||||
{!options && (
|
||||
<p
|
||||
style={{
|
||||
color: "#cccf",
|
||||
fontSize: "24px",
|
||||
userSelect: "none",
|
||||
textAlign: "center",
|
||||
paddingTop: "96px",
|
||||
}}
|
||||
>
|
||||
暂无数据
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -90,6 +103,7 @@ const SmokeTrendChart = (props) => {
|
||||
export default SmokeTrendChart;
|
||||
|
||||
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