我希望标记出现在刻度之间。我已经搜索但在 google 或 highcharts API 等上一无所获。
我的客户希望这些点出现在数字之间——而不是反对它们。
这是代码,
jQuery('.graph').highcharts({
chart: {
type: 'line',
marginRight: 10,
marginBottom: 20,
height: 117,
plotBorderColor: '#E6DB41',
plotBorderWidth: 2,
borderColor: '#0793D1',
borderRadius: 0,
borderWidth: 2
},
credits: {
enabled: false
},
title: {
text: ''
},
legend: {
enabled: false,
},
xAxis: {
tickLength: 0,
categories: ['11', '12','13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24'],
gridLineColor: '#cccccc',
gridLineWidth: 1,
tickmarkPlacement: 'on',
labels: {
formatter: function () {
return '<span style="fill: #0793D1;font-size:7px;">' + this.value + '</span>';
}
}
},
yAxis: {
tickInterval: 50,
max: 200,
min: -5,
startOnTick: false,
title: {
enabled: false
},
gridLineColor: '#cccccc',
gridLineWidth: 1,
labels: {
formatter: function () {
return '<span style="fill: #0793D1;font-size:9px;">' + this.value + '</span>';
}
},
offset:-5
},
series: [{
name: 'Reservierunge',
data: [<?php echo $hourlyData?>]
}],
plotOptions: {
series: {
marker: {
enabled: true
}
}
},
tooltip: {
enabled: false
},
exporting: {
enabled: false
},
colors: [
'#F80001',
'#0d233a',
'#8bbc21',
'#910000',
'#1aadce',
'#492970',
'#f28f43',
'#77a1e5',
'#c42525',
'#a6c96a'
]
});