I've been going through the code for
bl.ocks.org/stepheneb/1182434 to try and understand the panning and zooming aspects of D3, but it's not very clear. I'm not sure, but I think that there are some unused functions.
In either case, I need to take a time series line graph (values on y-axis defined with a linear scale; time on the x-axis defined with a time scale).
What are the steps that I need to take to zoom and update the display (how much is done for me by 'zoom', if any). And what do I need to do for panning to prevent the scales from going below 0 on Y and initial time on X (pan up and back to 'home' and right and back to 'home')?
Do I have to determine which data points have to be redrawn with 'path' elements? What about the circles I put over every path endpoint that holds the plotted value? For the example mentioned above, it seems like it may just be the circles that he puts on the graph.
If there is a site that has a nice recipe (or jsfiddle), that explains this, I would really appreciate the help.
Thanks.
Les