【发布时间】:2014-12-02 17:31:19
【问题描述】:
检查小提琴 - http://jsfiddle.net/4R5HH/209/ - 这只是为了测试。
我在 y 轴上有一个目标标签,当将鼠标悬停在它们上时会隐藏系列工具提示。
对此的任何解决方案。
$(function () {
$(document).ready(function() {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'line'
},
title: {
text: 'Dummy Data by Region'
},
xAxis: {
categories: ['Africa', 'America', 'Asia']
},
yAxis: {
plotLines:[{
value:75,
color: '#ff0000',
width:2,
zIndex:4,
label:{text:'goal'},
dashStyle: 'line',
label: {
useHTML: true,
text: '<div class="targetLabel"><span>Target</span><br/><span style="font-weight: bold; padding-top: 5px;">' + '75' + '</span></div>',
align: 'center',
rotation: 0
},
}]
},
series: [{
name: 'Year 1800',
data: [107, 31, 50]
},
{
name: 'Goal',
type: 'scatter',
marker: {
enabled: false
},
data: [450]
}]
});
});
});
【问题讨论】:
-
您好,请问您有什么问题吗?或者你想达到什么目标?
-
您的意思是工具提示在“下方”,蓝色目标圆圈?
-
工具提示隐藏在目标标签后面。那么如何在 Target 标签上方显示 tooltip。
-
你需要禁用tooltip,并新建一个html div。因为你有两种类型的元素(html 和 SVG)
标签: highcharts