问echarts插件的饼状图,怎么在后台传进参数去.代码如下
1个回答
展开全部
var oilCost = (data.oilCost); //data我是用ajax获得的,也可以其他方式传
var repairCoat = (data.repairCost);
var care = (data.careCost);
json = [
{value:repairCoat, name:'维修'},
{value:care, name:'保养'},
{value:oilCost, name:'加油'},
];
然后option里的series里的{data:json} 就ok了,,,能看懂么。。
var repairCoat = (data.repairCost);
var care = (data.careCost);
json = [
{value:repairCoat, name:'维修'},
{value:care, name:'保养'},
{value:oilCost, name:'加油'},
];
然后option里的series里的{data:json} 就ok了,,,能看懂么。。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询