我正在尝试使用Highchart显示时间轴,我的问题是,当您将鼠标放在系列的一个元素上时,它会突出显示并显示同一系列中其他元素的工具提示。我做错了什么?
您可以看到http://jsfiddle.net/ncdysafk/
var chart;
var options = {
chart: {
events: {
load: function(){
this.myTooltip = new Highcharts.Tooltip(this, this.options.tooltip);
}
},
renderTo: 'container',
type: 'columnrange',
inverted: true,
zoomType: 'y'
},
title: {
text: 'Portes de hoy'
},
xAxis: {
categories: ["SERIE1","SERIE2","SERIE3"]
},
yAxis: {
type: 'datetime',
title: {
text: 'Horas del día'
}
},
plotOptions: {
series: {
stickyTracking: true,
events: {
click: function(evt) {
this.chart.myTooltip.refresh(evt.point, evt);
},
mouseOut: function() {
this.chart.myTooltip.hide();
}
}
},
columnrange: {
grouping: false
}
},
legend: {
enabled: true
},
series: [{"name":"SERIE2","data":[{"x":1,"low":1425538800000,"high":1425543300000},{"x":1,"low":1425567600000,"high":1425571200000},{"x":1,"low":1425584000000,"high":1425589100000}]},{"name":"SERIE3","data":[{"x":2,"low":1425538800000,"high":1425543300000},{"x":2,"low":1425567600000,"high":1425571200000}]}]
};
chart = new Highcharts.Chart(options);
答案 0 :(得分:1)
这是Highcharts / Highstock的4.1.3 / 2.1.3版本中的错误。报告的错误是here。已修复,这意味着从主分支尝试https://github.highcharts.com/highstock.js
和https://github.highcharts.com/highcharts-more.js
个文件。工作演示http://jsfiddle.net/ncdysafk/1/