datapie = [
{"label": "Running", "data": [19.5], "color":"#e1ab0b"},
{"label": "Stopped", "data": [4.5], "color":"#fe0000"},
{"label": "Terminated", "data": [36.6], "color":'#93b40f"}
];
收到错误 TypeError:d未定义
请帮助!!
使用ajax
调用数据答案 0 :(得分:1)
数据看起来格式不正确。它应该是这样的:
datapie = [
{label: "Running", data: 19.5, color: '#e1ab0b'},
{label: "Stopped", data: 4.5, color: '#fe0000'},
{label: "Terminated", data: 36.6, color: '#93b40f'}
];