Skip to content

Commit

Permalink
fixed commonScale
Browse files Browse the repository at this point in the history
  • Loading branch information
julianheinrich committed Feb 16, 2016
1 parent ca9a3e9 commit 860394c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion d3.parcoords.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,14 @@ pc.commonScale = function(global, type) {
global = true;
}

// try to autodetect dimensions and create scales
if (!d3.keys(__.dimensions).length) {
pc.detectDimensions()
}
pc.autoscale();

// scales of the same type
var scales = __.dimensions.concat(__.hideAxis).filter(function(p) {
var scales = d3.keys(__.dimensions).filter(function(p) {
return __.dimensions[p].type == t;
});

Expand Down
8 changes: 7 additions & 1 deletion src/autoscale.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,14 @@ pc.commonScale = function(global, type) {
global = true;
}

// try to autodetect dimensions and create scales
if (!d3.keys(__.dimensions).length) {
pc.detectDimensions()
}
pc.autoscale();

// scales of the same type
var scales = __.dimensions.concat(__.hideAxis).filter(function(p) {
var scales = d3.keys(__.dimensions).filter(function(p) {
return __.dimensions[p].type == t;
});

Expand Down

0 comments on commit 860394c

Please sign in to comment.