Resizing paralllel coordinate plot

32 views
Skip to first unread message

Tim Dudgeon

unread,
Jul 18, 2016, 11:41:44 AM7/18/16
to d3-js
Hi All,
I need some help with the Parallel coordinate plot plugin:

I have the plot displaying, but I have it in a div that is re-sizeable, and am struggling with how to get it to re-display using its new dimensions.
I'm trying this (then the div changes size):

var newWidth = ...; // e.g. 300px
var newHeight = ...; // e.g. 250px
d3.parcoords()("#some_selector")
        .width(newWidth)
        .height(newHeight)
        .render()
        .updateAxes();

but the data disappears (though the axes remain), and the plot does not re-size.

That's the trick to getting this to work?

Thanks
Tim

Kai Chang

unread,
Jul 18, 2016, 9:00:13 PM7/18/16
to d3...@googlegroups.com
Your best bet is to completely re-initialize the chart with new data and clear the HTML in the container. I don't think responsiveness is implemented fully and d3.parcoords is not a standard d3 component that uses data bound to the element.

Posting on https://github.com/syntagmatic/parallel-coordinates/issues may get the attention of a maintainer who has a better solution.

--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages