disabledComposition: function () {
var option = {
tooltip: {
trigger: 'item'
},
calculable: true,
grid: {
borderWidth: 0,
y: 80,
y2: 60
},
xAxis: [
{
type: 'category',
show: false,
data: ['听力残疾', '视力残疾', '智力残疾', '肢体残疾', '精神残疾', '言语残疾']
}
],
yAxis: [
{
type: 'value',
show: false
}
],
series: [
{
name: '人口数量统计',
type: 'bar',
itemStyle: {
normal: {
color: function(params) {
var colorList = [
'#26C0C0','#259e2e','#FCCE10','#cccccc','#7b68ee','#00fa9a'
];
return colorList[params.dataIndex]
},
label: {
show: true,
position: 'top',
formatter: '{b}\n{c}'
}
}
},
data: [2010,210,1080,40,100,108],
markPoint: {
data: [
{xAxis:0, y: 350, name:'听力残疾'},
{xAxis:1, y: 350, name:'视力残疾'},
{xAxis:2, y: 350, name:'智力残疾'},
{xAxis:3, y: 350, name:'肢体残疾'},
{xAxis:4, y: 350, name:'精神残疾'},
{xAxis:5, y: 350, name:'言语残疾'}
]
}
}
]
};
var disabledCompositionEchart = echarts.init(document.getElementById("disabledComposition"));
disabledCompositionEchart.setOption(option,true);
}
上面是柱状图的代码,都严格了,没逗号的问题。。但ie8下还是出不来,求大神
你f12注意下是不是这之前的js有问题,ie8比较娇气,有一个js不兼容就可能死一片