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

@@ -37,12 +37,27 @@ function NatGas(props) {
size={["long", "short"]}
>
{/* real echarts here */}
<ReactECharts
key={Math.random()}
option={options}
// option={getOptions([[91, 69, 5, 10, 21, 46, 24]], "氧气")}
style={{ height: "100%" }}
/>
{options && (
<ReactECharts
key={Math.random()}
option={options}
// option={getOptions([[91, 69, 5, 10, 21, 46, 24]], "氧气")}
style={{ height: "100%" }}
/>
)}
{!options && (
<p
style={{
color: "#cccf",
fontSize: "24px",
userSelect: "none",
textAlign: "center",
paddingTop: "48px",
}}
>
暂无数据
</p>
)}
{/* real table data here */}
</GraphBase>
);
@@ -52,6 +67,7 @@ export default NatGas;
function getOptions(period, trend) {
console.log("getOptions", period, trend);
if (trend[period].length === 0) return null;
// export default function getOptions(seriesData, name) {
const colors = [
"#FFD160",