Harish Batchu

Harish Batchu

  • NA
  • 255
  • 65.4k

I have another query ?

Nov 3 2018 12:56 AM
function OnSuccess(response) {
var customers = response.d;
var ic = "";
var data = [];
var data1 = [];
var i = 0;
var j = 0;
var dps = [];
$(customers).each(function () {
//data['value'] = this.IncomeAmount;
//data['name']= this.IncomeType;
data.push(this.IncomeAmount);
data1.push(this.IncomeType);
ic += "'" + getRandomColor() + "',";
});
ic = ic.substring(0, ic.length - 1);
if ($('#e_chart_3').length > 0) {
var eChart_3 = echarts.init(document.getElementById('e_chart_3'));
var option3 = {
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)',
backgroundColor: 'rgba(33,33,33,1)',
borderRadius: 0,
padding: 10,
textStyle: {
color: '#fff',
fontStyle: 'normal',
fontWeight: 'normal',
fontFamily: 'Poppins, sans-serif',
fontSize: 12
}
},
legend: {
show: false
},
toolbox: {
show: false,
},
calculable: true,
itemStyle: {
normal: {
shadowBlur: 5,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
},
series: [
{
name: 'Month Income',
type: 'pie',
radius: '80%',
center: ['50%', '50%'],
roseType: 'radius',
color: [ic],
label: {
normal: {
fontFamily: 'Poppins, sans-serif',
fontSize: 12
}
},
data: [
{value:data, name:data1}
].sort(function (a, b) { return a.value - b.value; }),
},
],
animationType: 'scale',
animationEasing: 'elasticOut',
animationDelay: function (idx) {
return Math.random() * 1000;
}
};
eChart_3.setOption(option3);
eChart_3.resize();
}
}
 
above is the code i need ploat {rent,10000} for one color and another one {salary,20000} like this i need to do In Hold place salary and closed place rent
 

Answers (2)