我試圖禁用Highcharts上的標記,但仍然看到它們時,我將鼠標懸停在數據點上,無法使其工作。我試圖在圖表,系列和數據級別禁用標記,並且在每種情況下,標記都會消失,當我將鼠標懸停在它們上時,我無法獲取數據點。這裏是我禁用一個數據系列的標記的代碼:Highcharts禁用標記不起作用
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.1.js" type="text/javascript"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/highcharts-more.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<script>
$(document).ready(function() {
//Define the data points
//Define and render the HighChart
chart = new Highcharts.Chart({
chart: {
renderTo: "container",
defaultSeriesType: "scatter"
},
plotOptions: {
scatter: {
lineWidth: 2
}
},
series: [{data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
marker: {
enabled: false
}
},
{data: [129.9, 171.5, 10.4, 12.2, 14.0, 17.0, 13.6, 14.5, 21.4, 19.1, 9.6, 5.4]}]
})
})
</script>
</head>
<body>
<div id="container" style="height: 600px; min-width: 310px; max-width: 800px; margin: 0 auto"></div>
</body>
</html>
爲什麼不能正常工作?
它看起來像你真正想要的是折線圖。爲什麼不使用線型而不是散射型?散點圖存在用於在特定點顯示標記的目的。因此,禁用標記將會產生問題。 – jlbriggs 2014-09-09 19:24:27