var option = { tooltip : { formatter: "{a} <br/>{c} {b}" }, toolbox: { show: true, feature: { restore: {show: true}, dataView: {}, saveAsImage: {show: true} } }, title: { text: '', subtext:'' }, tooltip: {}, legend: { data:[ ] }, series: [ { type: 'pie', center: ['50%', '50%'], // 默认全局居中 radius: 125, label: { normal: { show: true, position: 'top', textStyle: { color: 'rgba(0, 0, 0, 1)' } } }, labelLine: { normal: { lineStyle: { color: 'rgba(0, 0, 0, 1)' }, } }, data: [ {value:9.31529748151342,name:'值1'}, {value:71.1291779584463,name:'值2'} ] } ] }; /* postImage('e339c4dd-fd64-4e32-ba8c-a98ab607027f', 'DATA_ESTIMATE', 'VALUE_LOCAL', 'null'); function postImage(sid, vault, imageSn, docSn) { // 向后台发起请求保存图片到指定目录. $.ajax({ type: 'POST', dataType: "json", url: "x3EChartSaveImageProcess.jsp?objectSid="+sid+"&vault="+vault+"&imageSn="+imageSn+"&docSn="+docSn, data: {"picInfo": myChart.getDataURL()}, success: function() { alert('通过post请求传输数据成功!'); } }); } */ /* */