fix some chord graph issues
diff --git a/planetstack/templates/admin/dashboard/slice_interactions.html b/planetstack/templates/admin/dashboard/slice_interactions.html
index 6fafc5c..3ddaa1f 100644
--- a/planetstack/templates/admin/dashboard/slice_interactions.html
+++ b/planetstack/templates/admin/dashboard/slice_interactions.html
@@ -305,6 +305,16 @@
//.transition().duration(100).attr("opacity", 1) //reset opacity
;
+ // XXX SMBAKER: The way the text was added with newGroups, it's only
+ // computed when a node is created. This is a problem if we redraw the
+ // graph with a different set of nodes, because the old labels will
+ // stick. So, I added this, which *seems* to cause the labels to be
+ // recomputed.
+ groupG.selectAll("text")
+ .text(function (d) {
+ return users[d.index].name;
+ });
+
//add the mouseover/fade out behaviour to the groups
//this is reset on every update, so it will use the latest
//chordPaths selection
@@ -326,6 +336,12 @@
});
*/
+ // XXX smbaker: there's a bug where if you hilight a slice of the chord
+ // graph, and then update the data, the freshly drawn graph is missing
+ // some of the chords. Flipping the fade bit seems to fix that.
+ chordPaths.classed("fade", true);
+ chordPaths.classed("fade", false);
+
last_layout = layout; //save for next update
// }); //end of d3.json