var chart = AmCharts.makeChart("w6", { "type": "pie", "theme": "light", "innerRadius": "1%", //"gradientRatio": [-0.4, -0.4, -0.4, -0.4, -0.4, -0.4, 0, 0.1, 0.2, 0.1, 0, -0.2, -0.5], "dataProvider": [{ "title": "社保", "value": 1028.24 }, { "title": "医保", "value": 255.06 }, { "title": "公积金", "value": 1512.36 }, { "title": "失业", "value": 25.21 }, { "title": "个税", "value": 7419.78 }, { "title": "1居室租金", "value": 5000 }, { "title": "收入", "value": 24759.15 }], "labelText":"[[value]]: [[title]]", "balloonText": "[[value,title]]", "valueField": "value", "titleField": "title", "balloonText" :"[[[title]]][[value]] ([[percents]]%)", "balloon": { "drop": false, "adjustBorderColor": false, "color": "#FFFFFF", "fontSize": 16 }, "colors":['navy','yellowgreen','#282828','tan','crimson','tan','gold'], formatter: function (x,y) { console.log(y.label) return x + y.label}, "export": { "enabled": true } }); var vchart = AmCharts.makeChart("w8", { "type": "pie", "theme": "light", "innerRadius": "1%", //"gradientRatio": [-0.4, -0.4, -0.4, -0.4, -0.4, -0.4, 0, 0.1, 0.2, 0.1, 0, -0.2, -0.5], "dataProvider": [{ "title": "社保", "value": 1028.24 }, { "title": "医保", "value": 255.06 }, { "title": "公积金", "value": 1512.36 }, { "title": "失业", "value": 25.21 }, { "title": "个税", "value": 20451.85 }, { "title": "1居室租金", "value": 5000 }, { "title": "收入", "value": 52211.15 }], "labelText":"[[value]]: [[title]]", "balloonText": "[[value,title]]", "valueField": "value", "titleField": "title", "balloonText" :"[[[title]]][[value]] ([[percents]]%)", "balloon": { "drop": false, "adjustBorderColor": false, "color": "#FFFFFF", "fontSize": 16 }, "colors":['navy','yellowgreen','#282828','tan','crimson','tan','gold'], formatter: function (x,y) { console.log(y.label) return x + y.label}, "export": { "enabled": true } });