|
@@ -25,12 +25,21 @@ function initChart(canvas, width, height, dpr, data) {
|
|
text: '',
|
|
text: '',
|
|
left: 'center'
|
|
left: 'center'
|
|
},
|
|
},
|
|
|
|
+ tooltip: {
|
|
|
|
+ trigger: 'axis',
|
|
|
|
+ axisPointer: {
|
|
|
|
+ type: 'cross',
|
|
|
|
+ label: {
|
|
|
|
+ backgroundColor: '#6a7985'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
renderAsImage: true, //支持渲染为图片模式
|
|
renderAsImage: true, //支持渲染为图片模式
|
|
color: ["#DF3E3E", "#80CDF8"],//图例图标颜色
|
|
color: ["#DF3E3E", "#80CDF8"],//图例图标颜色
|
|
legend: {
|
|
legend: {
|
|
show: true,
|
|
show: true,
|
|
itemGap: 25,//每个图例间的间隔
|
|
itemGap: 25,//每个图例间的间隔
|
|
- top: 30,
|
|
|
|
|
|
+ top: 5,
|
|
x: 30,//水平安放位置,离容器左侧的距离 'left'
|
|
x: 30,//水平安放位置,离容器左侧的距离 'left'
|
|
z: 100,
|
|
z: 100,
|
|
textStyle: {
|
|
textStyle: {
|
|
@@ -38,8 +47,9 @@ function initChart(canvas, width, height, dpr, data) {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
grid: {//网格
|
|
grid: {//网格
|
|
- // left: 30,
|
|
|
|
- // top:100,
|
|
|
|
|
|
+ left: "3%",
|
|
|
|
+ top:"8%",
|
|
|
|
+ right:"3%",
|
|
containLabel: true,//grid 区域是否包含坐标轴的刻度标签
|
|
containLabel: true,//grid 区域是否包含坐标轴的刻度标签
|
|
},
|
|
},
|
|
xAxis: {//横坐标
|
|
xAxis: {//横坐标
|
|
@@ -542,6 +552,15 @@ Page({
|
|
text: '',
|
|
text: '',
|
|
left: 'center'
|
|
left: 'center'
|
|
},
|
|
},
|
|
|
|
+ tooltip: {
|
|
|
|
+ trigger: 'axis',
|
|
|
|
+ axisPointer: {
|
|
|
|
+ type: 'cross',
|
|
|
|
+ label: {
|
|
|
|
+ backgroundColor: '#6a7985'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
renderAsImage: true, //支持渲染为图片模式
|
|
renderAsImage: true, //支持渲染为图片模式
|
|
color: ["#DF3E3E", "#80CDF8"],//图例图标颜色
|
|
color: ["#DF3E3E", "#80CDF8"],//图例图标颜色
|
|
legend: {
|
|
legend: {
|