var flattened = flatten(weaponData);
- for(i in weaponData.games.slice(0,10)) {
+ for(i in weaponData.games) {
var game_id = weaponData.games[i];
var sg = accuracyValue(flattened[game_id], "shotgun");
var sgTT = accuracyTooltip("shotgun", sg, weaponData.averages);
textStyle: { color: "#666" }
},
hAxis: {
- title: 'Game ID',
+ title: 'Games',
+ textPosition: 'none',
titleTextStyle: { color: '#666' }
},
vAxis: {
var flattened = flatten(weaponData);
- for(i in weaponData.games.slice(0,10)) {
+ for(i in weaponData.games) {
var game_id = weaponData.games[i];
var sg = damageValue(flattened[game_id], "shotgun");
var sgTT = damageTooltip("shotgun", sg);
gridlineColor: '#333',
},
hAxis: {
- title: 'Game ID',
+ title: 'Games',
+ textPosition: 'none',
titleTextStyle: { color: '#666' },
},
isStacked: true,
// weapon accuracy and damage charts
google.load('visualization', '1.1', {packages: ['corechart']});
-d3.json("${request.route_url('player_weaponstats_data_json', id=player.player_id, _query={'limit':10})}", function(err, data) {
+d3.json("${request.route_url('player_weaponstats_data_json', id=player.player_id, _query={'limit':20})}", function(err, data) {
if(data.games.length < 5) {
d3.select(".row #damageChart").remove();
d3.select(".row #accuracyChart").remove();
// have to remove the chart each time
d3.select('#damageChartSVG .nvd3').remove();
d3.select('#accuracyChartSVG .nvd3').remove();
- d3.json("${request.route_url('player_weaponstats_data_json', id=player.player_id, _query={'limit':10, 'game_type':g.game_type_cd})}", function(err, data) {
+ d3.json("${request.route_url('player_weaponstats_data_json', id=player.player_id, _query={'limit':20, 'game_type':g.game_type_cd})}", function(err, data) {
drawDamageChart(data);
drawAccuracyChart(data);
});