This commit is contained in:
lb
2024-01-02 14:33:21 +08:00
parent 4b043214ca
commit a32e6fb591
14 changed files with 261 additions and 86 deletions

View File

@@ -46,19 +46,34 @@ function Dust(props) {
size={["long", "middle"]}
>
{/* real echarts here */}
<ReactECharts
key={Math.random()}
option={options}
// option={getOptions(
// [
// [91, 164, 88, 120, 167, 158, 43],
// [30, 75, 52, 43, 73, 66, 36],
// [61, 89, 36, 77, 94, 92, 7],
// ],
// "氧气"
// )}
style={{ height: "100%" }}
/>
{options && (
<ReactECharts
key={Math.random()}
option={options}
// option={getOptions(
// [
// [91, 164, 88, 120, 167, 158, 43],
// [30, 75, 52, 43, 73, 66, 36],
// [61, 89, 36, 77, 94, 92, 7],
// ],
// "氧气"
// )}
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 Dust(props) {
export default Dust;
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 },