Closed shakedk closed 8 years ago
Documentation is lacking... You need to define a d3 scale like in the axis-config example:
var range = parcoords.height() - parcoords.margin().top - parcoords.margin().bottom;
var min = d3.min(data, function(d) {
return parseInt(d['displacement (cc)']);
});
var max = d3.max(data, function(d) {
return parseInt(d['displacement (cc)']);
});
var log = d3.scale.log().domain([min, max]).range([range, 1]);
Thanks @mcwillso !
Hi,
As mentioned in the API, the y-axis scale can be specified manually: " Dimension attributes include: .... "yscale": Type of scale to use for the axis(log, linear, ordinal ... "
I created a dimensions variable as follows: var dimensions = { "AreaID" : { title : 'Area ID', yscale: 'log' }, };
Then I added it to the parcoords variable:
When I run the code, I get the following error: Uncaught TypeError: __.dimensions[p.key].yscale is not a function (line 630 in d3.parcoords.js)
When I remove the yscale property, everything works ok and the title is changed as specified.
Any idea what am I might be doing wrong?
Thanks for this awesome tool, Shaked.