我正在尝试在条形图的内部创建一个带有dataLabels的倒置列范围图表但由于某种原因标签是向后的(左边是高,右边是低)。
var options = {
chart: {
type: 'columnrange',
inverted: true,
renderTo: 'container'
},
tooltip: {
enabled: false
},
xAxis: {
categories: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
},
yAxis: {
type: 'datetime',
dateTimeLabelFormats: {
hour: '%l:%M'
}
},
plotOptions: {
columnrange: {
dataLabels: {
enabled: true,
inside: true,
color: 'white',
formatter: function() {
return Highcharts.dateFormat('%l:%M', this.y);
}
}
}
},
series: [{
name: 'Series 1',
data: [{
"low": 1399536000000,
"high": 1399550400000,
"x": 0
}, {
"low": 1399536000000,
"high": 1399550400000,
"x": 1
}, {
"low": 1399536000000,
"high": 1399550400000,
"x": 2
}, {
"low": 1399536000000,
"high": 1399550400000,
"x": 3
}, {
"low": 1399536000000,
"high": 1399550400000,
"x": 4
}, {
"low": 1399536000000,
"high": 1399550400000,
"x": 5
}, {
"low": 1399536000000,
"high": 1399550400000,
"x": 6
}]
}]
};
$('#container').highcharts(options);
这是http://jsfiddle.net/slapner/S5m8z/6/
的小提琴由于