From: Ant Zucaro Date: Thu, 19 Sep 2013 23:33:28 +0000 (-0400) Subject: Use 30 games for the charts. Add link to overall rank page. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0a8266acf197d97bc1bf6e22a6eb467d376b6e4b;p=xonotic%2Fxonstat.git Use 30 games for the charts. Add link to overall rank page. --- diff --git a/xonstat/templates/player_info.mako b/xonstat/templates/player_info.mako index c69db15..4a887d9 100644 --- a/xonstat/templates/player_info.mako +++ b/xonstat/templates/player_info.mako @@ -33,7 +33,7 @@ $(function () { }) // weapon accuracy and damage charts -d3.json("${request.route_url('player_weaponstats_data_json', id=player.player_id)}", function(err, data) { +d3.json("${request.route_url('player_weaponstats_data_json', id=player.player_id, _query={'limit':30})}", function(err, data) { if(data.games.length < 5) { d3.select(".row #damageChartRow").remove(); d3.select(".row #accuracyChartRow").remove(); @@ -47,7 +47,7 @@ d3.select('.tab-${g.game_type_cd}').on("click", function() { // 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':20, 'game_type':g.game_type_cd})}", function(err, data) { + d3.json("${request.route_url('player_weaponstats_data_json', id=player.player_id, _query={'limit':30, 'game_type':g.game_type_cd})}", function(err, data) { drawDamageChart(data); drawAccuracyChart(data); }); @@ -145,23 +145,23 @@ Player Information % if g.game_type_cd in ranks: % if g.game_type_cd == 'overall': - Best Rank: ${ranks[g.game_type_cd].rank} of ${ranks[g.game_type_cd].max_rank} (${ranks[g.game_type_cd].game_type_cd}, percentile: ${round(ranks[g.game_type_cd].percentile,2)})
+ Best Rank: + + + ${ranks[g.game_type_cd].rank} of ${ranks[g.game_type_cd].max_rank} + + (${ranks[g.game_type_cd].game_type_cd}, percentile: ${round(ranks[g.game_type_cd].percentile,2)}) +
+
% else: Rank: - - - ${ranks[g.game_type_cd].rank} of ${ranks[g.game_type_cd].max_rank} - (percentile: ${round(ranks[g.game_type_cd].percentile,2)}) -
-
+ + + ${ranks[g.game_type_cd].rank} of ${ranks[g.game_type_cd].max_rank} + + (percentile: ${round(ranks[g.game_type_cd].percentile,2)}) +
+
% endif % else: