highchart常用的两图联动配置写法
chart: {
type: 'area',
plotBackgroundColor: null,
plotBorderWidth: 0,
plotShadow: false,
backgroundColor: 'transparent',
spacing: [10, 0, 10, 0],
},
xAxis: [{
categories: [1,2,3],
crosshair: {
width: 1,
},
top: '-50%',
},
{
categories: [4,5,6],
crosshair: {
width: 1,
},
}
],
yAxis: [
{
title: {
align: 'high',
text: '百分比(%)',
offset: 0,
rotation: 0,
y: 10,
},
crosshair: {
width: 1,
},
height: '50%',
labels: {
formatter() {
return `${(this.value * 100).toFixed(0)}`;
},
},
},
{
title: {
align: 'high