这是解决这些问题的示例。每当我将其放在单个日期范围内时,它都不会反映在图表上,但是当您将鼠标悬停或单击时,它就会出现在图表中。
Highcharts.getJSON('https://www.highcharts.com/samples/data/aapl-c.json',
function (data) {
Highcharts.stockChart('container', {
rangeSelector: {
selected: 1
},
title: {
text: 'AAPL Stock Price'
},
series: [{
name: 'AAPL',
data: data.slice(0,1),
tooltip: {
valueDecimals: 2
}
}]
});
});
默认情况下,Highstock中normal
的标记被禁用。您可以轻松打开它们:
series: [{
...,
marker: {
enabled: true
}
}]
实时演示: http://jsfiddle.net/BlackLabel/6m4e8x0y/4929/
API参考: https://api.highcharts.com/highstock/series.line.marker.enabled