Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on bundling/smoothing with dimension flipping #296

Open
Sigfried opened this issue Apr 13, 2016 · 1 comment
Open

error on bundling/smoothing with dimension flipping #296

Sigfried opened this issue Apr 13, 2016 · 1 comment

Comments

@Sigfried
Copy link

When I flip the same dimension I'm bundling on, the clusterCentroids get messed up:

d3.parcoords.js:1778 Uncaught TypeError: Cannot read property 'get' of undefined

    // centroids on 'virtual' axes
    if (i < cols - 1) {
        var cx = x + a * (position(p[i+1]) - x);
        var cy = y + a * (__.dimensions[p[i+1]].yscale(row[p[i+1]]) - y);
        if (__.bundleDimension !== null) {
---->       var leftCentroid = __.clusterCentroids.get(__.dimensions[__.bundleDimension].yscale(row[__.bundleDimension])).get(p[i]);
            var rightCentroid = __.clusterCentroids.get(__.dimensions[__.bundleDimension].yscale(row[__.bundleDimension])).get(p[i+1]);
            var centroid = 0.5 * (leftCentroid + rightCentroid);
            cy = centroid + (1 - __.bundlingStrength) * (cy - centroid);
        }
        centroids.push($V([cx, cy]));
    }
@dehli
Copy link
Collaborator

dehli commented Apr 14, 2016

Hey @Sigfried, thanks for pointing this out. Is from when you call flipAxes? Does the error also occur when you double click on an axis?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants