]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/nvd3_damage.mako
Chart updates work now. Had to recreate.
[xonotic/xonstat.git] / 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