1 var all = {"data":[[1,1.5,0.5,1],[1,2,1.5,2],[3.5,3,2,3],[3,4,3.5,4.5],[4,6,4.5,5.5],[5.5,7,6,7.5],[6.5,7.5,6.5,7.5],[7,8.5,7.5,9],[9,9.5,9,9.5]],"provinces":["健康","意外","人寿","财险"],"years":["风险指数1","风险指数2","风险指数3","风险指数4","风险指数5","风险指数6","风险指数7","风险指数8","风险指数9"]};2 var optionFour ={3 timeline: {4 show:false,5 axisType: ‘category‘,6 autoPlay: false,7 controlStyle:‘none‘, //隐藏自动播放的按钮
8 symbol: ‘emptyCircle‘,9 symbolSize:8,10 bottom:-20,11 left:‘15%‘,12 right:‘15%‘,13 itemStyle: {14 normal: {15 color: ‘#F68989‘, //圆点的颜色
16 borderWidth:1
17 }18 },19 checkpointStyle:{20 color:‘#fff‘,21 borderWidth:7,22 borderColor:‘#fdd68a‘,23 },24 lineStyle:{25 color:‘transparent‘, //线的颜色
26 width:1,//线的宽度
27 },28 data: all.years29 },30 options: [{31 toolbox: {32 show: false,33 orient: ‘vertical‘,34 x: ‘right‘,35 y: ‘center‘,36 feature: {37 mark: {38 show: false
39 },40 dataView: {41 show: true,42 readOnly: false
43 },44 //magicType: {//动态类型切换折线图和柱形图
45 //show: true,
46 //type: [‘line‘, ‘bar‘]
47 //},
48 restore: {49 show: false
50 },51 saveAsImage: {52 show: false
53 }54 }55 },56 grid: {57 top:10,//柱形图距上的高度
58 height:100//柱形图的高度
59 },60 xAxis: [{