I know this has been asked here a lot and there are already answers to this question both here and in the API Reference. However, none of the solutions have solved my issue.
我知道这里已经有很多问题了,这里和API参考中已经有了这个问题的答案。但是,没有一个解决方案能解决我的问题。
I am attempting to set the max on the y-axis to 490, but am consistently having it max at 1k. So far I have tried setting the max, setting alignTicks to false, setting the endOnTick to false, setting the tickInterval, and setting the minRange.
我试图将y轴上的最大值设置为490,但我始终将其最大值设置为1k。到目前为止,我已尝试设置max,将alignTicks设置为false,将endOnTick设置为false,设置tickInterval,并设置minRange。
yAxis: {
type: 'logarithmic',
minorTickInterval: 'auto',
title: {
text: 'Amounts'
},
max: 490,
alignTicks: false,
endOntick: false
}
At this point I'm at a complete loss. My sincere apologies if this has already been answered, I have yet to find any that has worked in this specific instance.
在这一点上,我完全失去了。我真诚的道歉,如果这已经得到了回答,我还没有找到任何在这个具体情况下有效的方法。
Quick unrelated question: Has anybody made a series span all columns horizontally? Any suggestions on better ways to do this than what I presently have would be greatly appreciated. Thanks all!
快速无关的问题:是否有人制作了一系列水平横跨所有列?任何有关更好的方法来做到这一点的建议将比我现在所拥有的将非常感激。谢谢大家!
1 个解决方案
#1
0
You should use endOnTick
not enOntick
. However, setting endOnTick
to false
means you will not receive last label/tick (well, just like the name of options says ;) ).
你应该使用endOnTick而不是enOntick。但是,将endOnTick设置为false意味着您将不会收到最后一个标签/勾号(好吧,就像选项名称所示;))。
In that case, use tickPositioner
, for example: http://jsfiddle.net/x0bj2rjn/9/
在这种情况下,请使用tickPositioner,例如:http://jsfiddle.net/x0bj2rjn/9/
yAxis: {
type: 'logarithmic',
minorTickInterval: 'auto',
title: {
text: 'Amounts'
},
max: 490,
alignTicks: false,
endOnTick: false,
tickPositioner: function (min, max) {
this.tickPositions.push(max);
return this.tickPositions;
}
},
#1
0
You should use endOnTick
not enOntick
. However, setting endOnTick
to false
means you will not receive last label/tick (well, just like the name of options says ;) ).
你应该使用endOnTick而不是enOntick。但是,将endOnTick设置为false意味着您将不会收到最后一个标签/勾号(好吧,就像选项名称所示;))。
In that case, use tickPositioner
, for example: http://jsfiddle.net/x0bj2rjn/9/
在这种情况下,请使用tickPositioner,例如:http://jsfiddle.net/x0bj2rjn/9/
yAxis: {
type: 'logarithmic',
minorTickInterval: 'auto',
title: {
text: 'Amounts'
},
max: 490,
alignTicks: false,
endOnTick: false,
tickPositioner: function (min, max) {
this.tickPositions.push(max);
return this.tickPositions;
}
},