For my diagramm I would like set additional data in highcharts. This answer is a good example for a way:
Set Additional Data to highcharts series
But how must I write this for JSON.parse sources?
series : [{
yAxis: 0,
name : 'Server-TPS',
data : JSON.parse(data.tps)
},
{
yAxis: 1,
name : 'Spieler-Anzahl',
data : JSON.parse(data.playercount)
}]
I would like add a JSON.parse(data.playername) for the specific time after the playercount in the toolbar.
The diagramm: http://redstoneworld.de/mc-status/diagramm/graph.php
After the mysql-search I push the data in a $json_encode:
array_push($array_playercount, array(strtotime($row['timestamp']) * 1000, $row['playercount']));
array_push($array_tps, array(strtotime($row['timestamp']) * 1000, $row['tps']));
array_push($array_playerlist, array(strtotime($row['timestamp']) * 1000, $row['playerlist']);
$json['playercount'] = json_encode($array_playercount, JSON_NUMERIC_CHECK);
$json['tps'] = json_encode($array_tps, JSON_NUMERIC_CHECK);
$json['playerlist'] = json_encode($array_playerlist, JSON_NUMERIC_CHECK);
echo json_encode($json, JSON_NUMERIC_CHECK);
Thanks for any help.
~ Robert