标签:
option = {
timeline: {
show: false,
data: [
‘数据分析‘,
],
label: {
formatter: function (s) {
return s.slice(0, 4);
}
},
autoPlay: false,
heigth: 1,
padding:1,
playInterval: 1500
},
options: [
{
title: {
‘text‘: ‘各城市广告位均价、销售率增幅分析(均价增幅 vs 销售率增幅)‘,
‘subtext‘: ‘----数据来自电子排期系统‘,
‘x‘: ‘center‘,
‘textStyle‘: {fontFamily:‘微软雅黑‘}
},
tooltip: {
trigger: ‘axis‘,
showDelay: 0,
axisPointer: {
show: true,
type: ‘cross‘,
lineStyle: {
type: ‘dashed‘,
width: 1
}
}
},
toolbox: {
‘show‘: true,
orient: ‘vertical‘,
x: ‘right‘,
y: ‘center‘,
‘feature‘: {
‘restore‘: { ‘show‘: true },
‘saveAsImage‘: { ‘show‘: true }
}
},
grid: { ‘y‘: 80, ‘y2‘: 100 },
xAxis: [{
‘type‘: ‘value‘,
‘name‘: ‘均价增幅(%)‘,
}],
yAxis: [{
‘type‘: ‘value‘,
‘name‘: ‘销售率增幅(%)‘,
}],
series: [
{
‘name‘: ‘销售均价增幅 , 销售率增幅‘,
‘type‘: ‘scatter‘,
markLine: {
data: [
{ type: ‘average‘, name: ‘销售均价增幅平均值‘, itemStyle: { normal: { borderColor: ‘green‘ } } },
{ type: ‘average‘, name: ‘销售率增幅平均值‘, valueIndex: 0, itemStyle: { normal: { borderColor: ‘green‘ } } }
]
},
symbol: ‘pin‘,
symbolSize: 5,
itemStyle: {
normal: {
label: {
show: true,
formatter: ‘{b}‘
},
color: ‘#ff6633‘
}
},
‘data‘: result.data //格式[{ name: ‘北京‘, value: [20, 5] }, { name: ‘上海‘, value: [17, 8] }
}
]
}
]
};
myScatter.clear();
myScatter.setOption(option);
}
标签:
原文地址:http://www.cnblogs.com/liuchuanxu/p/4613555.html