mac389
mac389

Reputation: 3133

Link two D3 plots

I'm trying to link two D3 plots so that selecting part of the histogram on the right, causes a certain scatter plot to display on the left.

This is my attempt.

My current question is why the right plot isn't rendering, which I think goes back to how to create and refer to multiple SVG tags in d3.

Upvotes: 2

Views: 1849

Answers (1)

david4096
david4096

Reputation: 204

D3 has SVG controls for this type of situation. What you are looking for is a brush with context.

Here are the API docs:

https://github.com/mbostock/d3/wiki/SVG-Controls

And here are two great examples:

http://bl.ocks.org/mbostock/4063663

http://bl.ocks.org/mbostock/1667367

Upvotes: 3

Related Questions