var test = { "type": "pie", "data": { "labels": ["硕士", "大专", "博士", "本科", "高中", "大学", "研究生", "中专", "博士后", "小学"], "datasets": [{ "label": "1", "backgroundColor": ["rgb(255, 99, 132)", "rgb(54, 162, 235)", "rgb(255, 205, 86)", "rgb(75, 192, 192)", "rgb(255, 159, 64)", "rgb(153,102,255)", "rgb(53,202,25)", "rgb(201,203,207)", "rgb(205,92,92)", "rgb(255,127,80)"], "data": [18455.0, 10966.0, 110687.0, 36694.0, 52771.0, 44232.0, 27544.0, 8150.0, 17595.0, 4408.0] }, { "label": "0", "backgroundColor": ["rgb(54, 162, 235)", "rgb(255, 205, 86)", "rgb(75, 192, 192)", "rgb(255, 159, 64)", "rgb(153,102,255)", "rgb(53,202,25)", "rgb(201,203,207)"], "data": [14349.0, 27926.0, 15275.0, 7341.0, 564716.0, 5091.0, 6431.0, 42321.0] }] }, "options": { "title": { "display": true, "text": "我的图表", "position": "top", "fontSize": 14, "fontColor": "#666", "fontStyle": "bold", "padding": "10" }, } }