如何从高图表中隐藏额外的水平线

问题描述 投票:0回答:1
当我在 y 轴配置中设置alignTicks: false 时,会显示另外 2 行。我添加了它来将 y 轴百分比限制为 100%。 minPadding 和 maxPadding 不适用于将 y 轴百分比限制为 100% 谁能知道如何将 y 轴百分比限制为 100% 或者我们如何删除额外的水平线。

图片-

https://i.sstatic.net/Z4YqLahm.png

任何人都可以知道如何将 y 轴百分比限制为 100% 或者我们如何删除额外的水平线。

charts highcharts angular2-highcharts
1个回答
0
投票
要隐藏额外的水平线,即 y 轴网格线,您可以将其宽度设置为 0。

Highcharts.chart("container", { yAxis: [{}, { opposite: true, tickInterval: 1, gridLineWidth: 0 }], series: [ { data: [2, 6, 4, 7, 9, 3], }, { type: "column", yAxis: 1, data: [3, 5, 4, 6, 7, 8, 4], } ] });
API参考:

https://api.highcharts.com/highcharts/yAxis.gridLineWidth

演示:

https://jsfiddle.net/BlackLabel/zk9erq73/

© www.soinside.com 2019 - 2024. All rights reserved.