javascript - D3plus options having no effect on chart -


i posted on d3plus google group haven't recieved response, seeing if here knows anything.

i've created treemap using d3plus , edit tooltip. i'd add % suffix 1 of values , i'd remove 'share' line altogether. i'd change global font size.

here variables i've added...

var visualization = d3plus.viz() .container("#viz") .data(sample_data) .type("tree_map") .id("name") .size("value") .font( {"size":10 } )//to change font size .color("growth") .format({    "number": function(number, key) {      var formatted = d3plus.number.format(number, key)      if (key === "growth") {       return formatted + " %"     }     else {       return formatted     }    } }) // add prefix .draw()   }); 

they seem have no effect whatsoever

here link chart... http://thetally.efinancialnews.com/tallyassets/pensions2/index.html maybe i've made mistake in order call code or i'm stuck,

thanks in advance ideas

check key variable, d3plus passes function provide number formatting. it's object. check against "growth" key use key.key:

.format({    "number": function(number, key) {      var formatted = d3plus.number.format(number, key)      if (key.key === "growth") {       return formatted + " %"     }     else {       return formatted     }    } }) 

to remove "share" line in tooltip use corresponding key:

.tooltip({     "share": false })   

unfortunately not change font size - changing font family seems work ...

.font({ "family": "times" }) 

Comments

Popular posts from this blog

javascript - How to update a get parameter in a url with jquery -

c - Run time Error with scanf -

amazon web services - How to determine the state of an AWS instance -