" +
"
" +
"
" + param[1].seriesName + ": " +
"
" + param[1].value + "" +
"
万元" +
"
" +
"" +
" " + param[2].seriesName + ": " +
"" + param[2].value + "" +
"万元" +
"
";
return resultTooltip
}
},
// color:['',''],
// legend: {
// show:true,
// data: [{name:'猪消费价',
// textStyle:{
// color:'#fff'
// }
// },
// {name:'猪消费数量',
// textStyle:{
// color:'#fff'
// }
// }
// ]
// },
legend: {
show: true,
right: 10,
top: 10,
textStyle: {
color: '#AAAAAA',
fontSize: 10
}
},
grid: {
top: '10%',
left: '3%',
right: '3%',
bottom: '5%',
containLabel: true
},
xAxis: [{
type: 'category',
boundaryGap: false,
data: xData,
axisTick: {
show: true //隐藏X轴刻度
},
axisLabel: {
show: true,
textStyle: {
color: "#aaaaaa" //X轴文字颜色
}
},
position: 'bottom'
},
],
yAxis: [{
type: 'value',
// name:'猪消费价(元/公斤)',
scale: true,
position: "left",
// boundaryGap: ['5%', '5%'],
axisLabel: {
formatter: '{value}',
show: true,
textStyle: {
color: "#fff"
}
},
nameTextStyle: {
color: "#fff"
},
splitLine: {
show: false
// lineStyle: {
// color: "#949696"
// }
},
},
{
min: 550,
type: 'value',
// name:'猪消费数量(万公斤)',
scale: true,
position: "right",
boundaryGap: ['5%', '5%'],
axisLabel: {
formatter: '{value}',
show: true,
textStyle: {
color: "#fff"
}
},
nameTextStyle: {
color: "#fff"
},
splitLine: {
show: false
// lineStyle: {
// color: "#949696"
// }
}
}
],
series: [{
name: attrs[0].name,
type: 'line',
color: color[0] + ')',
smooth: true, //曲线
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: color[0] + ', 0.3)'
}], false),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10
}
},
symbol: 'circle',
symbolSize: 5,
itemStyle: {
normal: {
color: color[0]+ ')', //折点颜色
lineStyle: {
color: color[0]+ ')' //折线颜色
}
},
emphasis: {
color: color[0]+ ')', //折点颜色
lineStyle: {
color: color[0]+ ')' //折线颜色
}
}
},
data: seriesData[0],
// markLine : {
// silent: true,
// data: markLine
// }
},
{
name: attrs[1].name,
type: 'line',
color: color[1] + ')',
smooth: true, //曲线
// yAxisIndex: 1,
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: color[1] + ', 0.3)'
}], false),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10
}
},
symbol: 'circle',
symbolSize: 5,
//必须放在data 上方
itemStyle: {
normal: {
color: color[1]+ ')', //折点颜色
lineStyle: {
color: color[1]+ ')' //折线颜色
}
},
emphasis: {
color: color[1]+ ')', //折点颜色
lineStyle: {
color: color[1]+ ')' //折线颜色
}
}
},
data: seriesData[1],
// markLine : {
// silent: true,
// data: markLine
// }
},
{
name: attrs[2].name,
type: 'line',
color: color[2] + ')',
smooth: true, //曲线
yAxisIndex: 1,
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: color[2] + ', 0.3)'
}], false),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10
}
},
symbol: 'circle',
symbolSize: 5,
//必须放在data 上方
itemStyle: {
normal: {
color: color[2]+ ')', //折点颜色
lineStyle: {
color: color[2]+ ')' //折线颜色
}
},
emphasis: {
color: color[2]+ ')', //折点颜色
lineStyle: {
color: color[2]+ ')' //折线颜色
}
}
},
data: seriesData[2],
// markLine : {
// silent: true,
// data: markLine
// }
}
]
};