]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/static/js/weaponCharts.js
Add weapon averages in the accuracy chart tooltip.
[xonotic/xonstat.git] / xonstat / static / js / weaponCharts.js
index 8e32893b99eb531a70cedcc9e9dc0b4a9dbd9069..f1066fa5cb3b5f870137d00a8467e021587a6ef9 100644 (file)
@@ -96,6 +96,9 @@ var drawAccuracyChart = function(data) {
           return 0;
         }
       })
+      .tooltip(function(key, x, y, e, graph) {
+        return '<h3>' + key + '</h3>' + '<p>' +  y + ' accuracy in game #' + x + ' <br /> ' + data.averages[key]  + '% average</p>';
+      })
       .color(keyColor);
 
     chart.xAxis