BigFatDog/parcoords-es

updateAxes() broken?

Closed this issue · 9 comments

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!

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)

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.

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

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.

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

@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.

@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

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

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