eclipse,js程序:
<script type=”text/javascript”>
//基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById(‘main1’));
var option =W ~ \ q {
tooltip : {
trigger: ‘axis’,
axisPointer : { // 坐标N \ n H V O轴指示器,坐标轴触发有效
t^ z ^ype : ‘shadow’ // 默认为直线,可选为:’line’ | ‘shadow’
}
},
legend: {
orient: ‘vertical’,
le( c 9 1ft: ‘lefD ] \ 7 – | g st’,
/*# D x + data: [] */
},
grid: {
left: ‘3%’,
ri$ o E r D Z 8 Wght: ‘4%’,
bottom: ‘3%’,
containLabel: true
},
xAxis : [
{
typ– V 7 N 5 A Ne : ‘category’,
data : []
}
],
yAxis : [
{
type : ‘value’
}
],
series :e 4 5 c r L . O [
{
name:’收入(元)’,
type:’bar’,
symbol:’empty5 5 4 } z Z @circle’,
d9 V c P Y 1 p 3ata:[]
}
]
};
// 使用刚指定的配置x a 0 d : h d 3项和数据显示图表。
myChart.setOption(option);
//myChart.showL( ! 1oading();
$.get(‘../../advertise/details/view’,{},functi) R r Bon(result){
console.log(“进入异步调用程序”);
if(result){
console.log(“json=”+result);
var companysa a [ t t s = [];
var moneys =[];
for7 @ d n(var i=0;i<result.length;i++){
//time = json[0].createTime.month+1;
companys.push(result[i].ge \ } Y 5gTf);
moneys.push(result[i].totalMoney);
}
myChart.setOption({
title:{
subtext:”,
},
xAxis: {
dato C ) v : J J V Xa:companys
},
legend:{i k J G w t
data:companys,
},
series:[{
name:’收入(元)’,
data:array
}
],
});
}else{
console.log(‘result:’+result);
}
}
);
&li @ .t;/script>
legend这个值显示不了