option4 = { // 鼠标移动提示框 tooltip: { // 触发类型('item':用于散点图、饼图。'axion':用于柱状图、折线图。'none':什么都不触发) trigger: 'axis', // 提示框内排序 order: 'seriesDesc', // 提示框背景颜色 backgroundColor: "#FF5800", axisPointer: { // 轴线类型 type: 'cross', // x轴,Y轴的文字背景色(要在轴线类型为'cross',才有用) label: { backgroundColor: 'red' }, // x轴指示线 crossStyle: { width: 2, type: 'dashed', }, // y轴的指示线 lineStyle: { type: 'dashed', width: 2, color: '#FEDC9B', }, } }, // 图表组件 legend: { // 图裂类型'plain':普通图例。缺省就是普通图例。 'scroll':可滚动翻页的图例。当图例数量较多时可以使用。 type: 'scroll', // 图列的位置 right: 30, top: 20, bottom: 20, // 图例宽高 // width:'80', // height:'auto', // 图例列表的布局朝向 orient: 'vertical', // 图列项里图标的类型,长方形,圆点等 // icon: 'rect', data: [ { name: '中转仓1', icon: 'rect', itemStyle: { color: '#000' } }, { name: '中转仓2', icon: 'rect', itemStyle: { color: '#FBC952' } }, ], // 图列的图标宽高 itemWidth: 50, itemHeight: 5, // 图列与图列之间的距离 itemGap: 5, // 图列前图标的属性 itemStyle: { // color :'red', borderCap: 'round', } }, // 图表内容 grid: { // 是否显示直角坐标系网格 show: false, left: '5%', right: '5%', bottom: '10%', // grid 区域是否包含坐标轴的刻度标签。只是内容的缩小 containLabel: false, // 背景色 backgroundColor: 'transparent' }, // 用于地图的绘制,支持在地理坐标系上绘制散点图,线集。(其他的图用不上) geo: { type: 'map', map: 'china', zlevel: -5, // 位置 layoutCenter: ['30%', '50%'], roam: false, silent: true, itemStyle: { normal: { // 地图边框颜色 borderColor: '#ffffff', // 地图边框宽度 borderWidth: 3, // 地图边框阴影颜色 shadowColor: '#ffffff', shadowColor: '#00F6FF', // 地图边框阴影颜色宽度 shadowBlur: 15, } } },
复制
《未完待续》