highcharts多个yAxis

安稳与你 提交于 2020-01-16 15:14:10

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
}]
});

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!