]> git.xonotic.org Git - xonotic/xonstat.git/commit
Use Google Charts instead of NVD3.js.
authorAnt Zucaro <azucaro@gmail.com>
Mon, 8 Dec 2014 03:21:31 +0000 (22:21 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Mon, 8 Dec 2014 03:21:31 +0000 (22:21 -0500)
commitc33045859097324608624e69ed113bd205def2a3
treece5fb63856473a93b65937f6f4efd429cc4a7995
parent8f8eaadef0c0e2d10c6d17af361b53617e774b73
Use Google Charts instead of NVD3.js.

The latter had some performance regressions after updating chrome.
These regressions caused browsers to crash in the worse cases.
Migrating to the Google Charts API provides a similar implementation
with a much nicer API. We get:

- Consistent colors for each weapon
- Clickable data points (events on selection)
- Tons of customization via a simple JSON options object
- No additional source files
- No need to buffer weapon stats JSON data with "zero" entries

Right now the AJAX requests are still using D3.js style. The next
step is to migrate them to jQuery or vanilla JS.
xonstat/static/js/weaponCharts.js
xonstat/templates/player_info.mako