dagda1
dagda1

Reputation: 28770

d3.js guidance on interactive scrolling an svg element

I have created this functionality using d3.js and mathjs that draws a curve and then draws the tangent of the curve on mouseover. The source code is here.

What I am interested in doing is allowing the user to scroll a cubic curve for example by dragging the x axis and then redrawing the graph.

Can anyone give me some high level guidance on how to achieve this?

Upvotes: 0

Views: 92

Answers (1)

Gilsha
Gilsha

Reputation: 14591

I think you can use d3 brush for this implementation.

Documentation: SVG-Controls

Sample Reference : Focus+Context via Brushing

Upvotes: 1

Related Questions