哈哈
配置项如下
const arr = [{
"unit": "IOPS",
"name": "test123",
"value": [{
"metric": {
"cluster_id": "domain-c7",
"instance": "172.16.25.86",
"dc_id": "datacenter-2",
"__name__": "vmware_host_numberWriteAveraged",
"job": "vmware-metrics",
"object": "datastore1"
},
"values": [
[1626855888, "11"],
[1626855908, "6"],
[1626855928, "10"],
[1626855948, "12"],
[1626855968, "7"],
[1626855988, "10"],
[1626856008, "13"],
[1626856028, "9"],
[1626856048, "16"],
[1626856068, "14"],
[1626856088, "6"],
[1626856108, "8"],
[1626856128, "11"],
[1626856148, "9"],
[1626856168, "9"],
[1626856188, "12"],
[1626856208, "4"],
[1626856228, "8"],
[1626856248, "11"],
[1626856268, "6"],
[1626856288, "12"],
[1626856308, "14"],
[1626856328, "7"],
[1626856348, "7"],
[1626856368, "9"],
[1626856388, "5"],
[1626856408, "7"],
[1626856428, "13"],
[1626856448, "8"],
[1626856468, "9"],
[1626856488, "9"],
[1626856508, "7"],
[1626856528, "9"],
[1626856548, "11"],
[1626856568, "6"],
[1626856588, "7"],
[1626856608, "14"],
[1626856628, "6"],
[1626856648, "6"],
[1626856668, "12"],
[1626856688, "5"],
[1626856708, "8"],
[1626856728, "12"],
[1626856748, "10"],
[1626856768, "12"],
[1626856788, "10"],
[1626856808, "6"],
[1626856828, "8"],
[1626856848, "10"],
[1626856868, "6"],
[1626856888, "8"],
[1626856908, "14"],
[1626856928, "8"],
[1626856948, "12"],
[1626856968, "23"],
[1626856988, "5"],
[1626857008, "12"],
[1626857028, "10"],
[1626857048, "7"],
[1626857068, "6"],
[1626857088, "12"],
[1626857108, "8"],
[1626857128, "6"],
[1626857148, "12"],
[1626857168, "8"],
[1626857188, "11"],
[1626857208, "22"],
[1626857228, "5"],
[1626857248, "10"],
[1626857268, "10"],
[1626857288, "7"],
[1626857308, "9"],
[1626857328, "12"],
[1626857348, "9"],
[1626857368, "8"],
[1626857388, "11"],
[1626857408, "4"],
[1626857428, "9"],
[1626857448, "10"],
[1626857468, "7"],
[1626857488, "8"],
[1626857508, "17"],
[1626857528, "4"],
[1626857548, "8"],
[1626857568, "10"],
[1626857588, "7"],
[1626857608, "6"],
[1626857628, "10"],
[1626857648, "7"],
[1626857668, "7"],
[1626857688, "11"],
[1626857708, "5"],
[1626857728, "11"],
[1626857748, "10"],
[1626857768, "5"],
[1626857788, "7"],
[1626857808, "15"],
[1626857828, "9"],
[1626857848, "13"],
[1626857868, "12"],
[1626857888, "5"],
[1626857908, "9"],
[1626857928, "12"],
[1626857948, "12"],
[1626857968, "9"],
[1626857988, "10"],
[1626858008, "6"],
[1626858028, "7"],
[1626858048, "18"],
[1626858068, "14"],
[1626858088, "12"],
[1626858108, "17"],
[1626858128, "9"],
[1626858148, "10"],
[1626858168, "13"],
[1626858188, "4"],
[1626858208, "11"],
[1626858228, "10"],
[1626858248, "9"],
[1626858268, "8"],
[1626858288, "11"],
[1626858308, "5"],
[1626858328, "8"],
[1626858348, "12"],
[1626858368, "7"],
[1626858388, "7"],
[1626858408, "18"],
[1626858428, "8"],
[1626858448, "11"],
[1626858468, "11"],
[1626858488, "9"],
[1626858508, "9"],
[1626858528, "14"],
[1626858548, "15"],
[1626858568, "8"],
[1626858588, "11"],
[1626858608, "7"],
[1626858628, "9"],
[1626858648, "17"],
[1626858668, "11"],
[1626858688, "10"],
[1626858708, "17"],
[1626858728, "7"],
[1626858748, "18"],
[1626858768, "19"],
[1626858788, "6"],
[1626858808, "10"],
[1626858828, "10"],
[1626858848, "7"],
[1626858868, "8"],
[1626858888, "11"],
[1626858908, "5"],
[1626858928, "7"],
[1626858948, "12"],
[1626858968, "5"],
[1626858988, "8"],
[1626859008, "22"],
[1626859028, "6"],
[1626859048, "8"],
[1626859068, "10"],
[1626859088, "10"],
[1626859108, "10"],
[1626859128, "13"],
[1626859148, "11"],
[1626859168, "9"],
[1626859188, "10"],
[1626859208, "5"],
[1626859228, "8"],
[1626859248, "12"],
[1626859268, "4"],
[1626859288, "8"],
[1626859308, "14"],
[1626859328, "5"],
[1626859348, "12"],
[1626859368, "9"],
[1626859388, "7"],
[1626859408, "8"],
[1626859428, "12"],
[1626859448, "8"],
[1626859468, "8"],
[1626859488, "9"]
]
}, {
"metric": {
"cluster_id": "domain-c7",
"instance": "172.16.25.86",
"dc_id": "datacenter-2",
"__name__": "vmware_host_numberWriteAveraged",
"job": "vmware-metrics",
"object": "LenovoPool"
},
"values": [
[1626855888, "3"],
[1626855908, "3"],
[1626855928, "3"],
[1626855948, "3"],
[1626855968, "3"],
[1626855988, "3"],
[1626856008, "3"],
[1626856028, "3"],
[1626856048, "3"],
[1626856068, "3"],
[1626856088, "3"],
[1626856108, "3"],
[1626856128, "3"],
[1626856148, "3"],
[1626856168, "3"],
[1626856188, "3"],
[1626856208, "3"],
[1626856228, "3"],
[1626856248, "3"],
[1626856268, "3"],
[1626856288, "3"],
[1626856308, "3"],
[1626856328, "3"],
[1626856348, "3"],
[1626856368, "3"],
[1626856388, "3"],
[1626856408, "3"],
[1626856428, "3"],
[1626856448, "3"],
[1626856468, "3"],
[1626856488, "3"],
[1626856508, "3"],
[1626856528, "3"],
[1626856548, "3"],
[1626856568, "3"],
[1626856588, "3"],
[1626856608, "3"],
[1626856628, "3"],
[1626856648, "3"],
[1626856668, "3"],
[1626856688, "3"],
[1626856708, "3"],
[1626856728, "3"],
[1626856748, "3"],
[1626856768, "3"],
[1626856788, "3"],
[1626856808, "3"],
[1626856828, "3"],
[1626856848, "3"],
[1626856868, "3"],
[1626856888, "3"],
[1626856908, "3"],
[1626856928, "3"],
[1626856948, "3"],
[1626856968, "3"],
[1626856988, "3"],
[1626857008, "3"],
[1626857028, "3"],
[1626857048, "3"],
[1626857068, "3"],
[1626857088, "3"],
[1626857108, "3"],
[1626857128, "3"],
[1626857148, "3"],
[1626857168, "3"],
[1626857188, "3"],
[1626857208, "3"],
[1626857228, "3"],
[1626857248, "3"],
[1626857268, "3"],
[1626857288, "3"],
[1626857308, "3"],
[1626857328, "3"],
[1626857348, "3"],
[1626857368, "3"],
[1626857388, "3"],
[1626857408, "3"],
[1626857428, "3"],
[1626857448, "3"],
[1626857468, "3"],
[1626857488, "3"],
[1626857508, "3"],
[1626857528, "3"],
[1626857548, "3"],
[1626857568, "3"],
[1626857588, "3"],
[1626857608, "3"],
[1626857628, "3"],
[1626857648, "3"],
[1626857668, "3"],
[1626857688, "3"],
[1626857708, "3"],
[1626857728, "3"],
[1626857748, "3"],
[1626857768, "3"],
[1626857788, "3"],
[1626857808, "3"],
[1626857828, "3"],
[1626857848, "3"],
[1626857868, "3"],
[1626857888, "3"],
[1626857908, "3"],
[1626857928, "3"],
[1626857948, "3"],
[1626857968, "3"],
[1626857988, "3"],
[1626858008, "3"],
[1626858028, "3"],
[1626858048, "3"],
[1626858068, "3"],
[1626858088, "3"],
[1626858108, "3"],
[1626858128, "3"],
[1626858148, "3"],
[1626858168, "3"],
[1626858188, "3"],
[1626858208, "3"],
[1626858228, "3"],
[1626858248, "3"],
[1626858268, "3"],
[1626858288, "3"],
[1626858308, "3"],
[1626858328, "3"],
[1626858348, "3"],
[1626858368, "3"],
[1626858388, "3"],
[1626858408, "3"],
[1626858428, "3"],
[1626858448, "3"],
[1626858468, "3"],
[1626858488, "3"],
[1626858508, "3"],
[1626858528, "3"],
[1626858548, "3"],
[1626858568, "3"],
[1626858588, "3"],
[1626858608, "3"],
[1626858628, "3"],
[1626858648, "3"],
[1626858668, "3"],
[1626858688, "3"],
[1626858708, "3"],
[1626858728, "3"],
[1626858748, "3"],
[1626858768, "3"],
[1626858788, "3"],
[1626858808, "3"],
[1626858828, "3"],
[1626858848, "3"],
[1626858868, "3"],
[1626858888, "3"],
[1626858908, "3"],
[1626858928, "3"],
[1626858948, "3"],
[1626858968, "3"],
[1626858988, "3"],
[1626859008, "3"],
[1626859028, "3"],
[1626859048, "3"],
[1626859068, "3"],
[1626859088, "3"],
[1626859108, "3"],
[1626859128, "3"],
[1626859148, "3"],
[1626859168, "3"],
[1626859188, "3"],
[1626859208, "3"],
[1626859228, "3"],
[1626859248, "3"],
[1626859268, "3"],
[1626859288, "3"],
[1626859308, "3"],
[1626859328, "3"],
[1626859348, "3"],
[1626859368, "3"],
[1626859388, "3"],
[1626859408, "3"],
[1626859428, "3"],
[1626859448, "3"],
[1626859468, "3"],
[1626859488, "3"]
]
}],
"selfdefineId": 27
}, {
"unit": "%",
"name": "aaaa",
"value": [{
"metric": {
"cluster_id": "domain-c7",
"instance": "强哥2号",
"dc_id": "datacenter-2",
"__name__": "vmware_vm_cpu_usage",
"job": "vmware-metrics",
"host_id": "host-10"
},
"values": [
[1626855888, "26.15"],
[1626855908, "27.16"],
[1626855928, "28.39"],
[1626855948, "22.78"],
[1626855968, "27.25"],
[1626855988, "25.21"],
[1626856008, "28.66"],
[1626856028, "27.97"],
[1626856048, "26.27"],
[1626856068, "25.03"],
[1626856088, "25.32"],
[1626856108, "23.62"],
[1626856128, "22.7"],
[1626856148, "25.06"],
[1626856168, "24.65"],
[1626856188, "25.93"],
[1626856208, "24.6"],
[1626856228, "26.24"],
[1626856248, "22.72"],
[1626856268, "24.91"],
[1626856288, "23.31"],
[1626856308, "20.63"],
[1626856328, "27.85"],
[1626856348, "25.66"],
[1626856368, "24.14"],
[1626856388, "22.93"],
[1626856408, "22.91"],
[1626856428, "21.24"],
[1626856448, "23.51"],
[1626856468, "22.43"],
[1626856488, "24.17"],
[1626856508, "24.29"],
[1626856528, "30.94"],
[1626856548, "25.56"],
[1626856568, "27.81"],
[1626856588, "19.79"],
[1626856608, "0.17"],
[1626856628, "12.88"],
[1626856648, "23.77"],
[1626856668, "28.18"],
[1626856688, "26.71"],
[1626856708, "26.2"],
[1626856728, "25.33"],
[1626856748, "26.77"],
[1626856768, "27.4"],
[1626856788, "25.4"],
[1626856808, "25.58"],
[1626856828, "19.24"],
[1626856848, "23.54"],
[1626856868, "30.82"],
[1626856888, "29.98"],
[1626856908, "28.55"],
[1626856928, "27.82"],
[1626856948, "26.04"],
[1626856968, "26.18"],
[1626856988, "27.71"],
[1626857008, "23.47"],
[1626857028, "24.33"],
[1626857048, "24.6"],
[1626857068, "23.17"],
[1626857088, "20.87"],
[1626857108, "24.59"],
[1626857128, "26.4"],
[1626857148, "33.38"],
[1626857168, "33.43"],
[1626857188, "28.3"],
[1626857208, "27.17"],
[1626857228, "31.14"],
[1626857248, "26.8"],
[1626857268, "23.49"],
[1626857288, "26.16"],
[1626857308, "24.32"],
[1626857328, "24.59"],
[1626857348, "25.19"],
[1626857368, "18.88"],
[1626857388, "0.1"],
[1626857408, "12.68"],
[1626857428, "21.39"],
[1626857448, "38.81"],
[1626857468, "35.68"],
[1626857488, "26.26"],
[1626857508, "16.28"],
[1626857528, "17.95"],
[1626857548, "25.83"],
[1626857568, "26"],
[1626857588, "26.65"],
[1626857608, "25.03"],
[1626857628, "25.2"],
[1626857648, "27.15"],
[1626857668, "34.83"],
[1626857688, "26.07"],
[1626857708, "19.85"],
[1626857728, "26.24"],
[1626857748, "26.81"],
[1626857768, "27.7"],
[1626857788, "29.8"],
[1626857808, "27.39"],
[1626857828, "26.96"],
[1626857848, "26.94"],
[1626857868, "28.25"],
[1626857888, "28.54"],
[1626857908, "29.03"],
[1626857928, "35.43"],
[1626857948, "33.17"],
[1626857968, "32.38"],
[1626857988, "34.95"],
[1626858008, "31.13"],
[1626858028, "6.06"],
[1626858048, "0.96"],
[1626858068, "22.72"],
[1626858088, "24.02"],
[1626858108, "23.82"],
[1626858128, "25.35"],
[1626858148, "24.83"],
[1626858168, "25.05"],
[1626858188, "20.1"],
[1626858208, "21.64"],
[1626858228, "27.33"],
[1626858248, "16.28"],
[1626858268, "12.33"],
[1626858288, "0.11"],
[1626858308, "0.06"],
[1626858328, "0.07"],
[1626858348, "8.78"],
[1626858368, "22.18"],
[1626858388, "25.89"],
[1626858408, "30.98"],
[1626858428, "27.92"],
[1626858448, "29.95"],
[1626858468, "29.32"],
[1626858488, "29.45"],
[1626858508, "33.35"],
[1626858528, "32.38"],
[1626858548, "22.8"],
[1626858568, "4.02"],
[1626858588, "4.52"],
[1626858608, "0.08"],
[1626858628, "19.98"],
[1626858648, "28.25"],
[1626858668, "20.42"],
[1626858688, "0.26"],
[1626858708, "0.18"],
[1626858728, "0.34"],
[1626858748, "0.53"],
[1626858768, "3.79"],
[1626858788, "0.59"],
[1626858808, "0.21"],
[1626858828, "0.14"],
[1626858848, "9.66"],
[1626858868, "23.87"],
[1626858888, "24.55"],
[1626858908, "25.96"],
[1626858928, "23.93"],
[1626858948, "24.25"],
[1626858968, "29.26"],
[1626858988, "25.93"],
[1626859008, "25.02"],
[1626859028, "25.31"],
[1626859048, "26.7"],
[1626859068, "24.15"],
[1626859088, "24.38"],
[1626859108, "28.07"],
[1626859128, "24.13"],
[1626859148, "27.08"],
[1626859168, "20.24"],
[1626859188, "22.05"],
[1626859208, "0.1"],
[1626859228, "0.92"],
[1626859248, "26.89"],
[1626859268, "25.64"],
[1626859288, "24.85"],
[1626859308, "30.76"],
[1626859328, "27.1"],
[1626859348, "25.77"],
[1626859368, "22.95"],
[1626859388, "18.81"],
[1626859408, "16.17"],
[1626859428, "16.12"],
[1626859448, "23.01"],
[1626859468, "21.21"],
[1626859488, "26.28"]
]
}, {
"metric": {
"cluster_id": "domain-c7",
"instance": "vm-1620-clone",
"dc_id": "datacenter-2",
"__name__": "vmware_vm_cpu_usage",
"job": "vmware-metrics",
"host_id": "host-10"
},
"values": [
[1626855888, "0.69"],
[1626855908, "0.97"],
[1626855928, "0.76"],
[1626855948, "0.89"],
[1626855968, "0.89"],
[1626855988, "0.86"],
[1626856008, "0.8"],
[1626856028, "1.48"],
[1626856048, "0.93"],
[1626856068, "2.5"],
[1626856088, "2.03"],
[1626856108, "2.13"],
[1626856128, "1.84"],
[1626856148, "0.91"],
[1626856168, "2.44"],
[1626856188, "0.82"],
[1626856208, "2.57"],
[1626856228, "0.82"],
[1626856248, "0.71"],
[1626856268, "0.75"],
[1626856288, "0.74"],
[1626856308, "0.54"],
[1626856328, "0.82"],
[1626856348, "0.72"],
[1626856368, "0.81"],
[1626856388, "1.22"],
[1626856408, "0.65"],
[1626856428, "0.61"],
[1626856448, "0.96"],
[1626856468, "0.92"],
[1626856488, "0.9"],
[1626856508, "1.27"],
[1626856528, "0.74"],
[1626856548, "2.34"],
[1626856568, "1.77"],
[1626856588, "2.16"],
[1626856608, "1.92"],
[1626856628, "0.58"],
[1626856648, "2.69"],
[1626856668, "1.08"],
[1626856688, "2.11"],
[1626856708, "0.85"],
[1626856728, "0.83"],
[1626856748, "0.53"],
[1626856768, "0.74"],
[1626856788, "0.71"],
[1626856808, "0.64"],
[1626856828, "0.76"],
[1626856848, "0.92"],
[1626856868, "1.41"],
[1626856888, "0.76"],
[1626856908, "0.92"],
[1626856928, "0.85"],
[1626856948, "1.22"],
[1626856968, "1.24"],
[1626856988, "1.51"],
[1626857008, "0.95"],
[1626857028, "2.37"],
[1626857048, "1.44"],
[1626857068, "1.83"],
[1626857088, "1.84"],
[1626857108, "0.75"],
[1626857128, "2.78"],
[1626857148, "1.15"],
[1626857168, "2.21"],
[1626857188, "0.86"],
[1626857208, "0.72"],
[1626857228, "0.58"],
[1626857248, "0.94"],
[1626857268, "1.04"],
[1626857288, "0.8"],
[1626857308, "0.84"],
[1626857328, "0.65"],
[1626857348, "0.91"],
[1626857368, "0.94"],
[1626857388, "0.95"],
[1626857408, "0.67"],
[1626857428, "0.7"],
[1626857448, "1.05"],
[1626857468, "1.27"],
[1626857488, "0.91"],
[1626857508, "2.01"],
[1626857528, "1.52"],
[1626857548, "1.68"],
[1626857568, "1.82"],
[1626857588, "0.67"],
[1626857608, "2.65"],
[1626857628, "0.97"],
[1626857648, "2.19"],
[1626857668, "0.86"],
[1626857688, "0.7"],
[1626857708, "0.75"],
[1626857728, "0.85"],
[1626857748, "0.83"],
[1626857768, "0.85"],
[1626857788, "0.68"],
[1626857808, "0.95"],
[1626857828, "0.99"],
[1626857848, "0.99"],
[1626857868, "1.16"],
[1626857888, "1.23"],
[1626857908, "0.95"],
[1626857928, "0.92"],
[1626857948, "1.26"],
[1626857968, "0.58"],
[1626857988, "2.09"],
[1626858008, "1.54"],
[1626858028, "2.03"],
[1626858048, "1.84"],
[1626858068, "0.82"],
[1626858088, "2.43"],
[1626858108, "0.92"],
[1626858128, "2.44"],
[1626858148, "0.83"],
[1626858168, "0.98"],
[1626858188, "1.06"],
[1626858208, "0.8"],
[1626858228, "0.59"],
[1626858248, "0.82"],
[1626858268, "0.81"],
[1626858288, "1.06"],
[1626858308, "0.92"],
[1626858328, "0.72"],
[1626858348, "1.15"],
[1626858368, "1.02"],
[1626858388, "0.78"],
[1626858408, "0.84"],
[1626858428, "1.23"],
[1626858448, "0.54"],
[1626858468, "1.88"],
[1626858488, "1.63"],
[1626858508, "1.81"],
[1626858528, "1.8"],
[1626858548, "0.78"],
[1626858568, "2.06"],
[1626858588, "0.91"],
[1626858608, "2.51"],
[1626858628, "0.85"],
[1626858648, "0.8"],
[1626858668, "0.84"],
[1626858688, "0.67"],
[1626858708, "1.05"],
[1626858728, "1.09"],
[1626858748, "1.18"],
[1626858768, "1.43"],
[1626858788, "1.41"],
[1626858808, "1.11"],
[1626858828, "1.17"],
[1626858848, "1.15"],
[1626858868, "0.77"],
[1626858888, "0.82"],
[1626858908, "1.51"],
[1626858928, "1.44"],
[1626858948, "2.33"],
[1626858968, "1.67"],
[1626858988, "2.13"],
[1626859008, "1.78"],
[1626859028, "0.81"],
[1626859048, "2.75"],
[1626859068, "1.24"],
[1626859088, "2.54"],
[1626859108, "1.1"],
[1626859128, "0.64"],
[1626859148, "0.95"],
[1626859168, "0.86"],
[1626859188, "0.84"],
[1626859208, "1.08"],
[1626859228, "0.77"],
[1626859248, "0.89"],
[1626859268, "0.97"],
[1626859288, "0.93"],
[1626859308, "0.61"],
[1626859328, "0.65"],
[1626859348, "0.61"],
[1626859368, "0.63"],
[1626859388, "1.27"],
[1626859408, "0.68"],
[1626859428, "2.06"],
[1626859448, "1.52"],
[1626859468, "1.82"],
[1626859488, "1.75"]
]
}, {
"metric": {
"cluster_id": "domain-c7",
"instance": "勾建强100号",
"dc_id": "datacenter-2",
"__name__": "vmware_vm_cpu_usage",
"job": "vmware-metrics",
"host_id": "host-10"
},
"values": [
[1626855888, "0.1"],
[1626855908, "0.14"],
[1626855928, "0.11"],
[1626855948, "0.1"],
[1626855968, "0.18"],
[1626855988, "0.09"],
[1626856008, "0.11"],
[1626856028, "0.11"],
[1626856048, "0.18"],
[1626856068, "0.1"],
[1626856088, "0.13"],
[1626856108, "0.11"],
[1626856128, "0.11"],
[1626856148, "0.17"],
[1626856168, "0.08"],
[1626856188, "0.11"],
[1626856208, "0.16"],
[1626856228, "0.08"],
[1626856248, "0.1"],
[1626856268, "0.21"],
[1626856288, "0.09"],
[1626856308, "0.11"],
[1626856328, "0.11"],
[1626856348, "0.16"],
[1626856368, "0.11"],
[1626856388, "0.13"],
[1626856408, "0.13"],
[1626856428, "0.09"],
[1626856448, "0.12"],
[1626856468, "0.15"],
[1626856488, "0.11"],
[1626856508, "0.15"],
[1626856528, "0.1"],
[1626856548, "0.11"],
[1626856568, "0.18"],
[1626856588, "0.08"],
[1626856608, "0.11"],
[1626856628, "0.14"],
[1626856648, "0.12"],
[1626856668, "0.1"],
[1626856688, "0.16"],
[1626856708, "0.12"],
[1626856728, "0.1"],
[1626856748, "0.16"],
[1626856768, "0.15"],
[1626856788, "0.11"],
[1626856808, "0.13"],
[1626856828, "0.1"],
[1626856848, "0.1"],
[1626856868, "0.16"],
[1626856888, "0.13"],
[1626856908, "0.11"],
[1626856928, "0.12"],
[1626856948, "0.12"],
[1626856968, "0.35"],
[1626856988, "0.13"],
[1626857008, "0.11"],
[1626857028, "0.12"],
[1626857048, "0.18"],
[1626857068, "0.12"],
[1626857088, "0.13"],
[1626857108, "0.12"],
[1626857128, "0.17"],
[1626857148, "0.11"],
[1626857168, "0.11"],
[1626857188, "0.11"],
[1626857208, "0.15"],
[1626857228, "0.12"],
[1626857248, "0.11"],
[1626857268, "0.14"],
[1626857288, "0.1"],
[1626857308, "0.14"],
[1626857328, "0.12"],
[1626857348, "0.12"],
[1626857368, "0.12"],
[1626857388, "0.18"],
[1626857408, "0.11"],
[1626857428, "0.09"],
[1626857448, "0.13"],
[1626857468, "0.1"],
[1626857488, "0.11"],
[1626857508, "0.18"],
[1626857528, "0.08"],
[1626857548, "0.1"],
[1626857568, "0.11"],
[1626857588, "0.13"],
[1626857608, "0.16"],
[1626857628, "0.13"],
[1626857648, "0.1"],
[1626857668, "0.11"],
[1626857688, "0.16"],
[1626857708, "0.11"],
[1626857728, "0.13"],
[1626857748, "0.12"],
[1626857768, "0.11"],
[1626857788, "0.14"],
[1626857808, "0.12"],
[1626857828, "0.09"],
[1626857848, "0.13"],
[1626857868, "0.15"],
[1626857888, "0.09"],
[1626857908, "0.43"],
[1626857928, "0.08"],
[1626857948, "0.12"],
[1626857968, "0.31"],
[1626857988, "0.09"],
[1626858008, "0.12"],
[1626858028, "0.15"],
[1626858048, "0.1"],
[1626858068, "0.15"],
[1626858088, "0.1"],
[1626858108, "0.15"],
[1626858128, "0.11"],
[1626858148, "0.11"],
[1626858168, "0.16"],
[1626858188, "0.11"],
[1626858208, "0.13"],
[1626858228, "0.1"],
[1626858248, "0.12"],
[1626858268, "0.12"],
[1626858288, "0.13"],
[1626858308, "0.18"],
[1626858328, "0.09"],
[1626858348, "0.14"],
[1626858368, "0.16"],
[1626858388, "0.13"],
[1626858408, "0.12"],
[1626858428, "0.13"],
[1626858448, "0.11"],
[1626858468, "0.14"],
[1626858488, "0.15"],
[1626858508, "0.1"],
[1626858528, "0.1"],
[1626858548, "0.18"],
[1626858568, "0.1"],
[1626858588, "0.09"],
[1626858608, "0.16"],
[1626858628, "0.09"],
[1626858648, "0.14"],
[1626858668, "0.15"],
[1626858688, "0.1"],
[1626858708, "0.14"],
[1626858728, "0.18"],
[1626858748, "0.11"],
[1626858768, "0.12"],
[1626858788, "0.17"],
[1626858808, "0.11"],
[1626858828, "0.18"],
[1626858848, "0.18"],
[1626858868, "0.12"],
[1626858888, "0.11"],
[1626858908, "0.18"],
[1626858928, "0.11"],
[1626858948, "0.08"],
[1626858968, "0.15"],
[1626858988, "0.08"],
[1626859008, "0.14"],
[1626859028, "0.15"],
[1626859048, "0.08"],
[1626859068, "0.1"],
[1626859088, "0.19"],
[1626859108, "0.06"],
[1626859128, "0.14"],
[1626859148, "0.13"],
[1626859168, "0.07"],
[1626859188, "0.12"],
[1626859208, "0.18"],
[1626859228, "0.06"],
[1626859248, "0.12"],
[1626859268, "0.14"],
[1626859288, "0.1"],
[1626859308, "0.14"],
[1626859328, "0.14"],
[1626859348, "0.08"],
[1626859368, "0.13"],
[1626859388, "0.17"],
[1626859408, "0.06"],
[1626859428, "0.11"],
[1626859448, "0.14"],
[1626859468, "0.1"],
[1626859488, "0.13"]
]
}, {
"metric": {
"cluster_id": "domain-c7",
"instance": "55123444444",
"dc_id": "datacenter-2",
"__name__": "vmware_vm_cpu_usage",
"job": "vmware-metrics",
"host_id": "host-10"
},
"values": [
[1626855888, "100"],
[1626855908, "100"],
[1626855928, "100"],
[1626855948, "100"],
[1626855968, "100"],
[1626855988, "100"],
[1626856008, "100"],
[1626856028, "100"],
[1626856048, "100"],
[1626856068, "100"],
[1626856088, "100"],
[1626856108, "100"],
[1626856128, "100"],
[1626856148, "100"],
[1626856168, "100"],
[1626856188, "100"],
[1626856208, "100"],
[1626856228, "100"],
[1626856248, "100"],
[1626856268, "100"],
[1626856288, "100"],
[1626856308, "100"],
[1626856328, "100"],
[1626856348, "100"],
[1626856368, "100"],
[1626856388, "100"],
[1626856408, "100"],
[1626856428, "100"],
[1626856448, "100"],
[1626856468, "100"],
[1626856488, "100"],
[1626856508, "100"],
[1626856528, "100"],
[1626856548, "100"],
[1626856568, "100"],
[1626856588, "100"],
[1626856608, "100"],
[1626856628, "100"],
[1626856648, "100"],
[1626856668, "100"],
[1626856688, "100"],
[1626856708, "100"],
[1626856728, "100"],
[1626856748, "100"],
[1626856768, "100"],
[1626856788, "100"],
[1626856808, "100"],
[1626856828, "100"],
[1626856848, "100"],
[1626856868, "100"],
[1626856888, "100"],
[1626856908, "100"],
[1626856928, "100"],
[1626856948, "100"],
[1626856968, "100"],
[1626856988, "100"],
[1626857008, "100"],
[1626857028, "100"],
[1626857048, "100"],
[1626857068, "100"],
[1626857088, "100"],
[1626857108, "100"],
[1626857128, "100"],
[1626857148, "100"],
[1626857168, "100"],
[1626857188, "100"],
[1626857208, "100"],
[1626857228, "100"],
[1626857248, "100"],
[1626857268, "100"],
[1626857288, "100"],
[1626857308, "100"],
[1626857328, "100"],
[1626857348, "100"],
[1626857368, "100"],
[1626857388, "100"],
[1626857408, "100"],
[1626857428, "100"],
[1626857448, "100"],
[1626857468, "100"],
[1626857488, "100"],
[1626857508, "100"],
[1626857528, "100"],
[1626857548, "100"],
[1626857568, "100"],
[1626857588, "100"],
[1626857608, "100"],
[1626857628, "100"],
[1626857648, "100"],
[1626857668, "100"],
[1626857688, "100"],
[1626857708, "100"],
[1626857728, "100"],
[1626857748, "100"],
[1626857768, "100"],
[1626857788, "100"],
[1626857808, "100"],
[1626857828, "100"],
[1626857848, "100"],
[1626857868, "100"],
[1626857888, "100"],
[1626857908, "100"],
[1626857928, "100"],
[1626857948, "100"],
[1626857968, "100"],
[1626857988, "100"],
[1626858008, "100"],
[1626858028, "100"],
[1626858048, "100"],
[1626858068, "100"],
[1626858088, "100"],
[1626858108, "100"],
[1626858128, "100"],
[1626858148, "100"],
[1626858168, "100"],
[1626858188, "100"],
[1626858208, "100"],
[1626858228, "100"],
[1626858248, "100"],
[1626858268, "100"],
[1626858288, "100"],
[1626858308, "100"],
[1626858328, "100"],
[1626858348, "100"],
[1626858368, "100"],
[1626858388, "100"],
[1626858408, "100"],
[1626858428, "100"],
[1626858448, "100"],
[1626858468, "100"],
[1626858488, "100"],
[1626858508, "100"],
[1626858528, "100"],
[1626858548, "100"],
[1626858568, "100"],
[1626858588, "100"],
[1626858608, "100"],
[1626858628, "100"],
[1626858648, "100"],
[1626858668, "100"],
[1626858688, "100"],
[1626858708, "100"],
[1626858728, "100"],
[1626858748, "100"],
[1626858768, "100"],
[1626858788, "100"],
[1626858808, "100"],
[1626858828, "100"],
[1626858848, "100"],
[1626858868, "100"],
[1626858888, "100"],
[1626858908, "100"],
[1626858928, "100"],
[1626858948, "100"],
[1626858968, "100"],
[1626858988, "100"],
[1626859008, "100"],
[1626859028, "100"],
[1626859048, "100"],
[1626859068, "100"],
[1626859088, "100"],
[1626859108, "100"],
[1626859128, "100"],
[1626859148, "100"],
[1626859168, "100"],
[1626859188, "100"],
[1626859208, "100"],
[1626859228, "100"],
[1626859248, "100"],
[1626859268, "100"],
[1626859288, "100"],
[1626859308, "100"],
[1626859328, "100"],
[1626859348, "100"],
[1626859368, "100"],
[1626859388, "100"],
[1626859408, "100"],
[1626859428, "100"],
[1626859448, "100"],
[1626859468, "100"],
[1626859488, "100"]
]
}],
"selfdefineId": 28
}, {
"unit": "%",
"name": "12312312312312312",
"value": [{
"metric": {
"cluster_id": "domain-c7",
"instance": "172.16.25.86",
"dc_id": "datacenter-2",
"__name__": "vmware_host_mem_usage",
"job": "vmware-metrics"
},
"values": [
[1626855888, "70.69"],
[1626855908, "70.69"],
[1626855928, "70.69"],
[1626855948, "70.69"],
[1626855968, "70.69"],
[1626855988, "70.69"],
[1626856008, "70.69"],
[1626856028, "70.69"],
[1626856048, "70.69"],
[1626856068, "70.69"],
[1626856088, "70.69"],
[1626856108, "70.69"],
[1626856128, "70.69"],
[1626856148, "70.69"],
[1626856168, "70.69"],
[1626856188, "70.69"],
[1626856208, "70.69"],
[1626856228, "70.69"],
[1626856248, "70.69"],
[1626856268, "70.69"],
[1626856288, "70.69"],
[1626856308, "70.69"],
[1626856328, "70.69"],
[1626856348, "70.69"],
[1626856368, "70.69"],
[1626856388, "70.69"],
[1626856408, "70.69"],
[1626856428, "70.69"],
[1626856448, "70.69"],
[1626856468, "70.69"],
[1626856488, "70.69"],
[1626856508, "70.69"],
[1626856528, "70.69"],
[1626856548, "70.69"],
[1626856568, "70.69"],
[1626856588, "70.69"],
[1626856608, "70.69"],
[1626856628, "70.69"],
[1626856648, "70.69"],
[1626856668, "70.69"],
[1626856688, "70.69"],
[1626856708, "70.69"],
[1626856728, "70.69"],
[1626856748, "70.69"],
[1626856768, "70.69"],
[1626856788, "70.69"],
[1626856808, "70.69"],
[1626856828, "70.69"],
[1626856848, "70.69"],
[1626856868, "70.69"],
[1626856888, "70.69"],
[1626856908, "70.69"],
[1626856928, "70.69"],
[1626856948, "70.69"],
[1626856968, "70.69"],
[1626856988, "70.69"],
[1626857008, "70.69"],
[1626857028, "70.69"],
[1626857048, "70.69"],
[1626857068, "70.69"],
[1626857088, "70.69"],
[1626857108, "70.69"],
[1626857128, "70.69"],
[1626857148, "70.69"],
[1626857168, "70.69"],
[1626857188, "70.69"],
[1626857208, "70.69"],
[1626857228, "70.69"],
[1626857248, "70.69"],
[1626857268, "70.69"],
[1626857288, "70.69"],
[1626857308, "70.69"],
[1626857328, "70.69"],
[1626857348, "70.69"],
[1626857368, "70.69"],
[1626857388, "70.69"],
[1626857408, "70.69"],
[1626857428, "70.69"],
[1626857448, "70.69"],
[1626857468, "70.69"],
[1626857488, "70.69"],
[1626857508, "70.7"],
[1626857528, "70.69"],
[1626857548, "70.69"],
[1626857568, "70.69"],
[1626857588, "70.69"],
[1626857608, "70.69"],
[1626857628, "70.69"],
[1626857648, "70.69"],
[1626857668, "70.69"],
[1626857688, "70.69"],
[1626857708, "70.69"],
[1626857728, "70.69"],
[1626857748, "70.69"],
[1626857768, "70.69"],
[1626857788, "70.69"],
[1626857808, "70.69"],
[1626857828, "70.69"],
[1626857848, "70.69"],
[1626857868, "70.69"],
[1626857888, "70.69"],
[1626857908, "70.69"],
[1626857928, "70.69"],
[1626857948, "70.7"],
[1626857968, "70.7"],
[1626857988, "70.69"],
[1626858008, "70.69"],
[1626858028, "70.69"],
[1626858048, "70.7"],
[1626858068, "70.7"],
[1626858088, "70.7"],
[1626858108, "70.7"],
[1626858128, "70.7"],
[1626858148, "70.7"],
[1626858168, "70.7"],
[1626858188, "70.7"],
[1626858208, "70.7"],
[1626858228, "70.7"],
[1626858248, "70.7"],
[1626858268, "70.7"],
[1626858288, "70.7"],
[1626858308, "70.7"],
[1626858328, "70.7"],
[1626858348, "70.7"],
[1626858368, "70.7"],
[1626858388, "70.7"],
[1626858408, "70.7"],
[1626858428, "70.7"],
[1626858448, "70.7"],
[1626858468, "70.7"],
[1626858488, "70.7"],
[1626858508, "70.7"],
[1626858528, "70.7"],
[1626858548, "70.7"],
[1626858568, "70.7"],
[1626858588, "70.7"],
[1626858608, "70.7"],
[1626858628, "70.7"],
[1626858648, "70.7"],
[1626858668, "70.7"],
[1626858688, "70.7"],
[1626858708, "70.7"],
[1626858728, "70.7"],
[1626858748, "70.7"],
[1626858768, "70.7"],
[1626858788, "70.7"],
[1626858808, "70.7"],
[1626858828, "70.7"],
[1626858848, "70.7"],
[1626858868, "70.7"],
[1626858888, "70.7"],
[1626858908, "70.7"],
[1626858928, "70.7"],
[1626858948, "70.7"],
[1626858968, "70.7"],
[1626858988, "70.7"],
[1626859008, "70.7"],
[1626859028, "70.7"],
[1626859048, "70.7"],
[1626859068, "70.7"],
[1626859088, "70.7"],
[1626859108, "70.7"],
[1626859128, "70.7"],
[1626859148, "70.7"],
[1626859168, "70.7"],
[1626859188, "70.7"],
[1626859208, "70.7"],
[1626859228, "70.7"],
[1626859248, "70.7"],
[1626859268, "70.7"],
[1626859288, "70.7"],
[1626859308, "70.7"],
[1626859328, "70.7"],
[1626859348, "70.7"],
[1626859368, "70.7"],
[1626859388, "70.7"],
[1626859408, "70.7"],
[1626859428, "70.7"],
[1626859448, "70.7"],
[1626859468, "70.7"],
[1626859488, "70.7"]
]
}],
"selfdefineId": 39
}]
let grid = []
let xAxis = []
let yAxis = []
let title = []
let series = []
let legend = []
let axisPointer = {
gridIndex: arr.length,
type: 'category',
data: ['1','2','3','4','5'],
//data: msg.intergrity_xAxis[0].data,
axisPointer: {
snap: true,
value: 2,
lineStyle: {
color: '#000',
opacity: 0.5,
width: 2
},
label: {
show: true,
// formatter: function (params) {
// return echarts.format.formatTime('yyyy-MM-dd hh:mm:ss', params.value);
// },
backgroundColor: '#004E52'
},
handle: {
show: true,
color: '#004E52'
}
}
}
for(let i = 0, len = arr.length; i < len; i++) {
let date = []
let value = arr[i].value
grid.push({left: '5%',x: '0%', y: i === 0 ? 50 : i * 250 + 'px', width: '90%', height: '150px'})
for (let o = 0, olen = value.length; o < olen; o++) {
console.log(value[o])
let valueList = []
let values = value[o].values
for (let x = 0, xlen = values.length; x < xlen; x++) {
if (o === 0) {
date.push(values[x][0])
}
valueList.push(values[x][1])
}
series.push({
type: 'line',
name: value[o].instance,
xAxisIndex: i,//使用x轴的index-0,y轴的index-0
yAxisIndex: i,
show:false,//是否进行展示
data: valueList,
})
}
legend.push({
orient: 'vertical',
x:'right', //可设定图例在左、右、居中
y:'center', //可设定图例在上、下、居中
padding:[0,50,0,0], //可设定图例[距上方距离,距右方距离,距下方距离,距左方距离]
gridIndex: i,
data: ['直接访问','微信','百度','其他文章','网页']
})
xAxis.push({
gridIndex: i,
type: 'category',
data: date
})
yAxis.push({gridIndex: i,})
title.push({text: arr[i].name, top: 0, left: '15%'})
}
console.log(legend)
xAxis.push(axisPointer)
yAxis.push({gridIndex: arr.length})
grid.push({left: 0, x: '0%', y: '0', width: '100%', height: '100%'})
option = {
tooltip : {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: legend,
grid: grid,
xAxis: xAxis,
yAxis: yAxis,
series: series
}
// option = {//axisPointer = {简单的 柱状图+饼图 展示
// //设置柱状图位置,x:与左侧边界距离;y:与上侧边界距离;width:柱状图宽度;height:柱状图高度
// grid: [
// {x: '0%', y: '0', width: '100%', height: '150px'},
// {x: '0%', y: '170px', width: '100%', height: '150px'},
// {x: '0%', y: '340px', width: '100%', height: '150px'},
// {x: '0%', y: '510px', width: '100%', height: '150px'},
// {x: '0%', y: '0', width: '100%', height: '100%'},
// ],
// //图表标题设置,其内容以及位置
// // title:
// // [{
// // text: '数据完整率',
// // left:'15%',
// // },
// // {
// // text: '数据有效率',
// // left:'70%',
// // },{
// // text: '在线仪器运转率',
// // left:'15%',
// // top:'30%',
// // },{
// // text: '数据超标率',
// // left:'70%',
// // top:'30%',
// // },{
// // text: '报警类型分布图',
// // left:'17%',
// // top:'60%',
// // },{
// // text: '报警响应分布图',
// // left:'67%',
// // top:'60%',
// // },],
// //X轴
// xAxis: [
// {
// gridIndex: 0, //定义index
// type: 'category',
// data: ['1','2','3','4','5'],
// },
// {
// gridIndex: 1,
// type: 'category',
// data: ['1','2','3','4','10'],
// //data: msg.intergrity_xAxis[0].data,
// },
// {
// gridIndex: 2,
// type: 'category',
// data: ['1','2','3','4','5'],
// //data: msg.intergrity_xAxis[0].data,
// },
// {
// gridIndex: 3,
// type: 'category',
// data: ['1','2','3','4','5'],
// //data: msg.intergrity_xAxis[0].data,
// },
// {
// gridIndex: 4,
// type: 'category',
// data: ['1','2','3','4','5'],
// //data: msg.intergrity_xAxis[0].data,
// axisPointer: {
// snap: true,
// value: 2,
// lineStyle: {
// color: '#000',
// opacity: 0.5,
// width: 2
// },
// label: {
// show: true,
// // formatter: function (params) {
// // return echarts.format.formatTime('yyyy-MM-dd hh:mm:ss', params.value);
// // },
// backgroundColor: '#004E52'
// },
// handle: {
// show: true,
// color: '#004E52'
// }
// }
// }
// ],
// yAxis: [ //y轴
// {gridIndex: 0 ,},//定义y轴index
// {gridIndex: 1 ,},
// {gridIndex: 2 ,},
// {gridIndex: 3 ,},
// {gridIndex: 4 ,},
// ],
// tooltip : {
// trigger: 'item',
// formatter: "{a} <br/>{b} : {c} ({d}%)"
// },
// series: [
// {
// type: 'line',
// name: '123',
// xAxisIndex: 0,//使用x轴的index-0,y轴的index-0
// yAxisIndex: 0,
// show:false,//是否进行展示
// data: ['1','2','3','4','5'],
// },
// {
// type: 'line',
// name: '456',
// xAxisIndex: 0,
// yAxisIndex: 0,
// data: ['4','5','7','1','2'],
// //data: msg.intergrity_series[0].data,
// },
// {
// type: 'line',
// xAxisIndex: 2,
// yAxisIndex: 2,
// data: ['1','2','3','4','10'],
// //data: msg.intergrity_series[0].data,
// },
// {
// type: 'line',
// //X与Y使用的INDEX
// xAxisIndex: 3,
// yAxisIndex: 3,
// data: ['1','2','3','4','5'],
// //data: msg.intergrity_series[0].data,
// }]
// };
console.log(option)
console.log(arr)