[英]How to make graph with 4 Y axis
I want to make a graph with 4 Y axis. 我想制作一个Y轴为4的图形。 I know how to make dual Y axis graph but I am not able to make the graph with 4 y axis.I have included one example of dual Y axis graph.someone, please help me in this dual y axis graph to make 4 y axis graph.
我知道如何制作双Y轴图,但我无法制作具有4 y轴的图。我提供了一个双Y轴图的示例。请有人帮助我在此双y轴图中制作4 y轴图形。
Highcharts.chart('container', { chart: { marginRight: 80 // like left }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, yAxis: [{ lineWidth: 1, title: { text: 'Primary Axis' } }, { lineWidth: 1, opposite: true, title: { text: 'Secondary Axis' } }], series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }, { data: [144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2], yAxis: 1 }] });
<div id="container" style="height: 400px"></div> <script src="https://code.highcharts.com/highcharts.js"></script>
Same as you did for two axis. 与对两个轴所做的相同。
define 4 axis in yAxis section and in series section specify which data goes into which axis. 在yAxis部分中定义4轴,在series部分中定义哪些数据进入哪个轴。
yAxis: [{
lineWidth: 1,
title: {
text: 'Primary Axis'
}
}, {
lineWidth: 1,
opposite: true,
title: {
text: 'Secondary Axis'
}
}, {
lineWidth: 1,
opposite: false,
title: {
text: 'third Axis'
}
}, {
lineWidth: 1,
opposite: false,
title: {
text: 'fourth Axis'
}
}],
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}, {
data: [144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2],
yAxis: 1
}, {
data: [44.0, 76.0, 35.6, 48.5, 116.4, 180.1, 195.6, 154.4, 129.9, 72.5, 108.4, 159.2],
yAxis: 2
}, {
data: [ 95.6, 54.4, 29.9, 71.5, 106.4, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1,129.2],
yAxis: 3
}]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.