This commit is contained in:
lb 2023-12-29 09:31:33 +08:00
parent 060616e845
commit 3f44cb9e9a
3 changed files with 12 additions and 12 deletions

View File

@ -43,7 +43,7 @@ function FanInfo(props) {
], ],
oddRowBGC: "#042444", oddRowBGC: "#042444",
evenRowBGC: "#042c4c", evenRowBGC: "#042c4c",
columnWidth: [50, 144], columnWidth: [50, 136],
rowNum, rowNum,
hoverPause: false, hoverPause: false,
data: attachStyle(data), data: attachStyle(data),

View File

@ -64,7 +64,6 @@ function FaultTotal(props) {
export default FaultTotal; export default FaultTotal;
function preHandleStatisticData(data, legend) { function preHandleStatisticData(data, legend) {
console.table(data);
const obj = {}; const obj = {};
data.forEach((item) => { data.forEach((item) => {
obj[item.name] = {}; obj[item.name] = {};
@ -86,17 +85,18 @@ function preHandleStatisticData(data, legend) {
data: [], data: [],
})); }));
const seriesData = [];
legend.forEach((item, index) => { legend.forEach((item, index) => {
series[index].name = item; series[index].name = item;
data.forEach((d, index) => { data.forEach((d, idx) => {
if (index == 0) { // if (index == 0) {
series[index].label = { // series[index].label = {
show: true, // show: true,
position: "top", // position: "top",
distance: 10, // distance: 10,
color: "#fffc", // color: "#fffc",
}; // };
} // }
series[index].data.push(obj[d.name][item] || 0); series[index].data.push(obj[d.name][item] || 0);
}); });
}); });

View File

@ -8,7 +8,7 @@
place-items: center; place-items: center;
background: #fff; background: #fff;
position: fixed; position: fixed;
bottom: 0; bottom: -5vh;
opacity: 0; opacity: 0;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);