]> nos-oignons.net Git - website.git/blobdiff - assets/weights_graphs.js
graphnion.*.draw: Passage à l'API basée sur les promesses
[website.git] / assets / weights_graphs.js
index 8116d017695ce05713a9fb7b230acb5fc0a26a50..5ed7cb173042253fbfdee6cdad6aa06ed6fb835d 100644 (file)
@@ -238,7 +238,8 @@ WeightsDrawer.prototype.update_period = function(period) {
 
 WeightsDrawer.prototype.draw = function() {
   var drawer = this;
-  d3.json(WeightsDrawer.onionoo_url, function(error, raw_data) {
+  d3.json(WeightsDrawer.onionoo_url)
+    .then(function(raw_data) {
     d3.select(drawer.selector).text("");
     drawer.draw_weights_graph(raw_data);
   });