highcharts多个yAxis

var chart = Highcharts.chart('container', {
chart: {
},
title: {
text: ''
},
xAxis: {
categories: [
'杭州总部',
'上海分部',
'北京分部'
],
crosshair: true,
labels:{
style:{
"color":"#000","font-size":"10px"
}
},
gridLineColor:"#014256",
gridLineDashStyle:"Dash",
tickInterval: 2,
lineColor:"#000",
lineWidth:1
},
yAxis: [
{
title: {
text: ''
},
labels:{
style:{
"color":"#000","font-size":"10px"
},
formatter: function () {
return this.value + 'ms';
}
},
opposite: true,
gridLineColor:"#014256",
gridLineDashStyle:"Dash",
lineColor:"#014256",
lineWidth:1,
showFirstLabel: false
},{
min: 0,
title: {
text: ''
},
labels:{
style:{
"color":"#000","font-size":"10px"
}
},
gridLineColor:"#014256",//网格线颜色
gridLineDashStyle:"Dash",//网格样式例如虚线
lineColor:"#014256",//轴线颜色
lineWidth:1,//轴线宽度
showFirstLabel: false
}
],
legend: {
shadow: false
},
tooltip: {
shared: true
},
plotOptions: {
column: {
stacking: 'normal',
},
bar: {
borderColor: ""
}
},
series: [{
name: '雇员',
color: 'rgba(1,2,3,1)',
type: 'line',
data: [1, 2, 3],
}, {
name: '优化的员工',
color: 'rgba(126,86,134,.9)',
type: 'column',
borderColor: "",
data: [1430, 930, 430],
yAxis: 1 // 指定数据列所在的 yAxis
}, {
name: '利润',
color: 'rgba(248,161,63,1)',
type: 'column',
borderColor: "",
data: [1833.6, 1738.8, 1398.5],
yAxis: 1 // 指定数据列所在的 yAxis
}, {
name: '优化的利润',
color: 'rgba(186,60,61,.9)',
type: 'column',
borderColor: "",
data: [2303.6, 1938.8, 2308.5],
yAxis: 1
}]
});

猜你喜欢

转载自www.cnblogs.com/lixihong/p/12200878.html
今日推荐