Reputation: 131
The problem with getting tooltips. You see only tooltip on the first point and the last over.
How to help output tooltip for all points on the graph?
var options = {
chart: {
type: 'line',
renderTo: 'container',
zoomType: 'x'
},
xAxis: {
type: 'datetime'
},
tooltip: {
shared: true,
crosshairs: true,
xDateFormat: '<b>%H:%M</b>'
},
"series": [{
"name": "T",
"data": [[1365895320000, 26], [1365895020000, 26.0625], [1365894720000, 26.0625], [1365894420000, 26.0625], [1365894120000, 26.125], [1365893820000, 26.125], [1365893520000, 26.1875], [1365893220000, 26.1875], [1365892920000, 26.25], [1365892620000, 26.25], [1365892320000, 26.3125], [1365892020000, 26.3125], [1365891720000, 26.3125], [1365891420000, 26.375], [1365891120000, 26.375], [1365890820000, 26.375], [1365890520000, 26.4375], [1365890220000, 26.5], [1365889920000, 26.5625], [1365889620000, 26.5625], [1365889320000, 26.625], [1365889020000, 26.6875], [1365888720000, 26.6875], [1365888420000, 26.75], [1365888120000, 26.8125], [1365887820000, 26.875], [1365887520000, 26.9375], [1365887220000, 27.0625], [1365886920000, 27.125], [1365886620000, 27.1875], [1365886320000, 27.25], [1365886020000, 27.1875], [1365885720000, 27.25], [1365885420000, 27.25], [1365885120000, 27.25], [1365884820000, 27.25], [1365884520000, 27.25], [1365884220000, 27.3125], [1365883920000, 27.3125], [1365883620000, 27.3125] ]
}]
};
var chart = new Highcharts.Chart(options);
Upvotes: 3
Views: 762
Reputation: 108512
Highcharts expects the data to be presorted ascending on the X values.
someData = [
[1365895320000, 26],
[1365895020000, 26.0625],
[1365894720000, 26.0625],
[1365894420000, 26.0625],
[1365894120000, 26.125],
[1365893820000, 26.125]
];
someData.sort();
See fixed fiddle here.
Upvotes: 2