several plugins for v4

41 views
Skip to first unread message

Vijith Assar

unread,
Sep 12, 2016, 2:08:40 PM9/12/16
to d3-js
I've recently updated several plugins to work with D3 version 4:

d3-textwrap: line wrapping for long text strings (example)
d3-history: enable deep linking to specific interface states based on events (example)
d3-parent: inverted selection that searches up the DOM tree (example)
d3-rect: draw rectangles with path strings instead of rect elements (example)

Mike Bostock

unread,
Sep 12, 2016, 2:44:16 PM9/12/16
to d3-js
I took the liberty of adding your plugins to the wiki, as well as re-organizing the page to call out the plugins that have been updated to v4:


Regarding d3-rect, I’m not sure if this is useful to you, but d3-path implements path.rect from the CanvasPathMethods API. This means that you can write code that takes a CanvasPathMethods instance as input, and can either render directly to a canvas given a CanvasRenderingContext2D or render to SVG using d3-path. See the d3-shape symbol implementations for examples:

Reply all
Reply to author
Forward
0 new messages