]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Chart updates work now. Had to recreate.
authorAnt Zucaro <azucaro@gmail.com>
Fri, 6 Sep 2013 13:16:11 +0000 (09:16 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Fri, 6 Sep 2013 13:16:11 +0000 (09:16 -0400)
xonstat/templates/nvd3_damage.mako

index 6a59e611fb2725e0c40bae92350a1b14b77814cd..71cfe43c98b3dbeb254f029b51970ccee0dd5bd7 100644 (file)
@@ -37,6 +37,8 @@ ${parent.js()}
 
 % for gt in ('overall','duel','ctf','dm','tdm','ca','kh','ft','lms','as','dom','nb','cts','rc'):
 d3.select('.sprite-${gt}').on("click", function() {
+  // have to remove the chart each time
+  d3.select('#damageChartSVG .nvd3').remove();
   d3.json("${request.route_url('player_weaponstats_data_json', id=player_id, _query={'limit':limit, 'game_type':gt})}", drawDamageChart);
 });
 % endfor