gpt4 book ai didi

Highcharts yAxis 未缩放以填充可用高度

转载 作者:行者123 更新时间:2023-12-01 04:26:32 27 4
gpt4 key购买 nike

我在处理图表时遇到问题,其中图表的高度未缩放以填充该区域。图表对象本身正确缩放到容器 div 中,是 yAxis 本身卡在收缩状态。我相信这与使用较小的数字有关,但我不是 100% 确定

任何指导将不胜感激

编辑 - JSFiddle

"yAxis": {
"min": 0,
"categories": [],
"title": {
"text": "Hit Rate"
},
"stackLabels": {
"enabled": false
},
"labels": {
"overflow": "justify"
},
"tickInterval":0.1
}

enter image description here

最佳答案

来自 doc :

tickInterval: number

The interval of the tick marks in axis units. When undefined, the tick interval is computed to approximately follow the tickPixelInterval on linear and datetime axes. On categorized axes, a undefined tickInterval will default to 1, one category.


如果删除 categories: [] y 轴选项,图形会正确自动缩放。
编辑:我没有看到您设置了 tickInterval,但解决方案(从 y 轴删除空类别)仍然解决了问题。

关于Highcharts yAxis 未缩放以填充可用高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58171924/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com