原数据格式:[
{
prodName : "产品1",
faultName : "类别1",
quantity : 3
},
{
prodName : "产品1",
faultName : "类别2",
quantity : 23
},
{
prodName : "产品2",
faultName : "类别2",
quantity : 11
},
{
prodName : "产品3",
faultName : "类别3",
quantity : 13
},
{
prodName : "产品4",
faultName : "类别1",
quantity : 20
},
]
期望:[
{
name:'类别1',
data:[3,0,0,20]
},
{
name:'类别2',
data:[23,11,0,0]
},
{
name:'类别3',
data:[0,0,13,0]
}
]
prodName与faultName有多少未知