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

updateAxes() broken? #15

Closed
joshhjacobson opened this issue Jun 14, 2018 · 9 comments · Fixed by #17
Closed

updateAxes() broken? #15

joshhjacobson opened this issue Jun 14, 2018 · 9 comments · Fixed by #17

Comments

@joshhjacobson
Copy link
Contributor

When using the updateAxes function, I get the following error: TypeError: node is null

For a reproducible example, I've added it to brushing.html:

// load csv file and create the chart
        d3.csv('data/cars.csv').then(function(data) {
            parcoords
                .data(data)
                .hideAxis(["name"])
                .composite("darker")
                .render()
                .shadows()
                .reorderable()
                .brushMode("1D-axes")  // enable brushing
                .on("brushend", function(brushed) {

                  parcoords.updateAxes();

                });
        });

Any insight would be appreciated!

@BigFatDog
Copy link
Owner

Confirmed a bug. Version 2.1.0 has been released with the bug-fix

updateAxes should be used after changing dimension orders, other than in brushend events. (Brushing on a dimension doesn't change its corresponding axis. furthermore, updateAxes() will brush chart again, which will result in triggering brushend event infinitely)

@BigFatDog BigFatDog reopened this Jun 14, 2018
@joshhjacobson
Copy link
Contributor Author

Thanks for taking care of that! It seems to be working perfectly, except for in one specific case:

I'm starting with one of the axes hidden, and then on a button click I want to reveal that axis. Here is an example:

  var hidden = ["name", "weight (lb)"]
  var parcoords = ParCoords()("#example")
         .alpha(0.4);

  // load csv file and create the chart
  d3.csv('data/cars.csv').then(function(data) {
      parcoords
          .data(data)
          .hideAxis(hidden)
          .composite("darker")
          .render()
          .shadows()
          .reorderable()
          .brushMode("1D-axes");  // enable brushing
  });

  d3.select('#show').on('click', function () {
      hidden = ["name"]
      parcoords.hideAxis(hidden);
      parcoords.render().updateAxes(500); // animationTime (ms)
  });

This gives the error TypeError: node is undefined, and then attempting to reorder the axes is broken.

@BigFatDog BigFatDog mentioned this issue Jun 16, 2018
@BigFatDog BigFatDog reopened this Jun 16, 2018
@BigFatDog
Copy link
Owner

v2.1.1 has been released with the bug-fix.

@joshhjacobson
Copy link
Contributor Author

Thanks! This seems to have handled all the console errors, and axis reordering is mostly functional. While testing, I noticed a bug where the right-most axis seems to become disconnected from the canvas. You can still interact with all the other axes by dragging them around and brushing, but the right-most one is unresponsive. If you drag another axis toward it, the polylines will adjust accordingly, but the svg axis itself will remain fixed.

show

This was produced using the example above where I start with one axis hidden, and then click the button to 'show' it.

@BigFatDog
Copy link
Owner

You're welcome.
The above problem is a bug. I observe that when a hidden axis is revealed, it cannot be dragged or brushed.

@timelyportfolio
Copy link
Contributor

timelyportfolio commented Jun 25, 2018

@BigFatDog, not sure if this is related or should be a separate issue, but on reorder of axes (reproducible example), I get

image

Thanks so much for your ambitious upgrade of parallel-coordinates.

@BigFatDog
Copy link
Owner

@timelyportfolio #27 is opened to track this bug.

Your words on observable link are warm and inspiring. Those words let me recall your article that I read long ago: "Time isn't money" -- I feel strongly that my time that are contributed to open-source are valued and my efforts are respected.

Thank you a lot for your kindness and understanding. All the best!

Yun

@BigFatDog
Copy link
Owner

@joshhjacobson 's issue is tracked in #26
@timelyportfolio 's issue is tracked in #27

@timelyportfolio
Copy link
Contributor

Very appreciative of your work @BigFatDog and very likely will be in position to contribute over the next couple of months. Thanks so much!

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

Successfully merging a pull request may close this issue.

3 participants