d3.js - Sankey Diagram (D3) - How to use multiple units for link values and how to add notes to mouseover popup box? -
http://bl.ocks.org/d3noob/5028304
looking @ example, hovering on link shows source, target, , value. value appended variable 'units', example "widgets".
var units = "widgets"; var formatnumber = d3.format(",.0f"), // 0 decimal places format = function(d) { return formatnumber(d) + " " + units; }, color = d3.scale.category20();
is there way of creating classes link between 1 source , target appended 1 type of unit , others use different units? in example, let's wanted links between "energy" , of targets use mwh units, other links use widgets.
i'd love know how add notes, such urls, text box pops on mouse hover.
you add unit
property on data objects , pass d.unit
format
along d.value
.
you can't elaborate default <title>
tooltip there million jquery plugins doing more elaborate things tooltips
Comments
Post a Comment