配置项:
1.title:组件标题
2.tooltip:提示框组件
触发类型:tooltip.trigger = ‘item’ 图形触发,散点图饼图
tooltip.trigger = ‘axis’ 坐标轴触发,柱状折线图
tooltip.trigger = ‘none’ 不触发
3.legend
legend: {
formatter: function(name) {
return '前面 '+name //格式化文本
},
bottom:0,
top:30,
left:20,
right:10, //图例组件离容器上下左右的距离。
padding:[10,5,10,5], //图例内边距
orient: ‘horizontal’, //图例列表的布局朝向 垂直vertical,默认水平
align:‘auto’, //left,right,auto 默认left
itemGap: 50, //图例每项之间的间隔
itemWidth: 24, //图例标记的图形宽度。
itemHeight:15, //图例标记的图形高度。
data: [‘邮件营销’, ‘联盟广告’, ‘视频广告’, ‘直接访问’, ‘搜索引擎’]
},
4.toolbox: {
feature: {
saveAsImage: {} //保存图片
}
},
5.grid 内部图 containLabel: true //防止标签溢出
6.xAxis.type value数值轴 category类目轴 time时间轴 log对数轴
类目轴中 boundaryGap 可以配置为 true 和 false。默认为 true,这时候刻度只是作为分隔线,标签和数据点都会在两个刻度之间的带(band)中间
7.color:默认颜色随机分配,自定义color:[],&title同级
8.series: 系列列表纵坐标
type:类型 line/bar
name:系列名称 用于toolttip/legend的提示名称
stack: 数据堆叠,如果设置相同值,则会数据堆叠
如果给stack指定不同值或者去掉这个属性不会发生数据堆叠