Highcharts x轴勾号以偏移量开始 [英] Highcharts x-axis tick starts with an offset
问题描述
我试图在 x轴
的记号上删除偏移量
。
我希望第一个勾号 10/8
从 x轴开始
和 y轴
相交。
10-8
应位于两个标签之间的标记上。
我在highchart中有以下代码。
xAxis:{
类别:类别,
title:{
text:title_x_axis,
style:{
fontWeight: 'bold'
},
formatter:function(){
return< h3>< b> + this.value +< / b>< / h3>;
min 0
startOnTick true $ b $ endOnTick true
minPadding 0
maxPadding 0 ,
align:left
},
最大填充和最小填充设置为0,所以我不知道问题是什么?
编辑:
我创建了一个我正在处理的图表类型的
使用newcharts版本的highcharts获得完整的工作提示:
< script src =http:// github.highcharts.com/highcharts.js\"></script>
I am trying to remove the offset
on the tick of the x-axis
.
I want the first tick 10/8
to start from the x-axis
and y-axis
intersection.
10-8
should be on the marker which is between the two labels.
I have following code for it in highchart.
xAxis: {
categories: categories,
title: {
text: title_x_axis,
style: {
fontWeight: 'bold'
},
formatter: function(){
return "<h3><b>" + this.value + "</b></h3>";
}
},
min: 0,
startOnTick: true,
endOnTick: true,
minPadding: 0,
maxPadding: 0,
align: "left"
},
Max padding and min padding are set to 0, So I don't know what the problem is?
EDIT:
I have created a fiddle of the type of chart I am dealing with.
Note Image below has different x-axis values as I am not using the same value of fiddle.
Also I have set tickmarkPlacement: "on"
after I took that snapshot.
I want Jan
label to start from the beginning of line. It has some offset currently.
Can anyone help me with this?
You could use (assuming 'categories' is your array of categories)
min: 0.5,
max: categories.length-1.5,
startOnTick: false,
endOnTick: false,
Example: http://jsfiddle.net/27hg0v06/1/
Use newset version of highcharts to get fully working tooltip:
<script src="http://github.highcharts.com/highcharts.js"></script>
这篇关于Highcharts x轴勾号以偏移量开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!