javascript - Why are .domain, tickFormat and tickValues not recognised inside dimensions variable? (d3, parallel coordinates) -
i creating parallel coordinates plot using d3.js, struggling format axis labeling like.
for instance, 1 of axes, 'buffer concentration', plotted on log scale, i've specified through dimensions variable, so.
var dimensions = [ ... { key: "b.conc", description: "buffer concentration", type: types["number"], scale: d3.scale.log().domain([.1, 100]).range([innerheight, 0]), tickvalues: [.1,.2,.4,.6,.8,1,2,4,6,8,10,20,40,60], tickformat: d3.format(4,d3.format(",d")) }, ... ]; however, can see resulting plot below, attempt specify tick labels shown (through tickvalues) , shown ordinary numbers rather powers of 10 (through tickformat) not working. additionally, axis not span domain specified in scale; should [0.1, 100], not [0.1, 60].
why this?
code
the data.csv, index.html , style.css files plot can found here. when opening locally, [only] works in firefox.
thanks in advance help, , apologies if i'm missing basic - i'm new d3.
it seems forgot apply custom ticks , tick values generated scales in line: https://gist.github.com/lthorburn/5f2ce7d9328496b5f4c123affee8672f#file-index-html-l189
not sure, smth should help.
if (d.tickvalues) { renderaxis.tickvalues(d.tickvalues); } if (d.tickformat) { renderaxis.tickformat(d.tickformat); } 
Comments
Post a Comment