私のグラフは毎秒更新され、ツールチップにタイムスタンプ(2016年4月7日、15:12:38)を表示したいと考えています。次のようになります。http://jsfiddle.net/qq5rqazj/2/。私は自分のチャートをカスタマイズする方法を知らない。私は、コードのスニペットを囲む:ハイチャートの書式設定 - ツールチップ、日x軸のタイムスタンプ
$('#container').highcharts({
chart:{
type: 'spline',
animation: Highcharts.svg,
marginRight: 10,
events: {load: function() {series = this.series[0];}}
},
title:{text: 'Live random data'},
xAxis:{tickPixelInterval: 150},
yAxis:{title: {text: 'Value'},
plotLines: [{value: 0,width: 1,color: '#808080'}]
},
tooltip: {
formatter: function() {
return '<b>' + this.series.name + '</b><br/>' +
Highcharts.numberFormat(this.x, 2) + '<br/>' +
Highcharts.numberFormat(this.y, 2);
}
},
legend: {
enabled: false
},
exporting: {
enabled: false
},
series: [{ name: 'Random data', data:DatosRecuperados}]
});
のx、yのxはint型であり、yは現在のタイムスタンプ2016年5月29日ここでデータベースから17時56分15秒