Highcharts 导航器鼠标悬停不工作
Highcharts navigator mouse over not working
当我从左和右调整底部导航器的大小时,工具提示上的鼠标停止工作,但当缩放设置为 YTD 或 ALL 时它工作正常,请问如何解决这个问题?谢谢!
https://jsfiddle.net/BlackLabel/anp4L9do/1
series: [{
type: 'spline',
name: 'Price',
point: {
events: {
mouseOver: function(e) {
var point = this,
chart = point.series.chart;
chart.series[1].points[point.index].setState('hover');
},
mouseOut: function(e) {
var point = this,
chart = point.series.chart;
chart.series[1].points[point.index].setState('normal');
},
},
},
states: {
inactive: {
opacity: 1
}
},
data: [
[1541514600000, 20100.92],
[1543847400000, 18428.466]
]
}, {
type: 'column',
name: 'Volume',
data: [
[1541514600000, 31882900],
[1543847400000, 40802500]
],
states: {
inactive: {
opacity: 1
}
},
enableMouseTracking: false,
yAxis: 1
}]
});
带点的数组被简化为只有可见点,请改用 data
数组:
point: {
events: {
mouseOver: function(e) {
var point = this,
chart = point.series.chart;
chart.series[1].data[point.index].setState('hover');
},
mouseOut: function(e) {
var point = this,
chart = point.series.chart;
chart.series[1].data[point.index].setState('normal');
},
},
}
当我从左和右调整底部导航器的大小时,工具提示上的鼠标停止工作,但当缩放设置为 YTD 或 ALL 时它工作正常,请问如何解决这个问题?谢谢!
https://jsfiddle.net/BlackLabel/anp4L9do/1
series: [{
type: 'spline',
name: 'Price',
point: {
events: {
mouseOver: function(e) {
var point = this,
chart = point.series.chart;
chart.series[1].points[point.index].setState('hover');
},
mouseOut: function(e) {
var point = this,
chart = point.series.chart;
chart.series[1].points[point.index].setState('normal');
},
},
},
states: {
inactive: {
opacity: 1
}
},
data: [
[1541514600000, 20100.92],
[1543847400000, 18428.466]
]
}, {
type: 'column',
name: 'Volume',
data: [
[1541514600000, 31882900],
[1543847400000, 40802500]
],
states: {
inactive: {
opacity: 1
}
},
enableMouseTracking: false,
yAxis: 1
}]
});
带点的数组被简化为只有可见点,请改用 data
数组:
point: {
events: {
mouseOver: function(e) {
var point = this,
chart = point.series.chart;
chart.series[1].data[point.index].setState('hover');
},
mouseOut: function(e) {
var point = this,
chart = point.series.chart;
chart.series[1].data[point.index].setState('normal');
},
},
}