var _series=[]; var array=[ { name:'成功率', value: 0.54 }, { name:'不成功率', value: 0.45999999999999996 } ] array.forEach((r)=>{ _series.push({ name: r.name, data: r.value, stroke: false }) })
_series 结果: