Need some help with YAxis zoom with jquery slider control

55 views
Skip to first unread message

William Andrews

unread,
May 23, 2013, 2:01:55 PM5/23/13
to d3...@googlegroups.com
Hello,
I am trying to emulate the functionality found in this example: http://bl.ocks.org/dem42/3878029
but instead with the zoom being applied to the y-axis.

I think I am close as I can get the Y-axis itself to redraw and transition appropriately, but redrawing the lines isn't working.

I suspect the issue is with this code:

   svg.selectAll('.path')
        .data(data)
        .enter()
        .append('path')
        .attr('d', function (d) {
        return line(d.values);
    })
        .attr('class', 'path')
        .attr('clip-path', "url(#clip)")
        .attr('stroke', function (d) {
        return d.color;
    });

it works when drawing the chart with lines initially but doesn't seem to work in the onSliderChange handler

complete code is here:

Thank you! :)

-William

William Andrews

unread,
May 23, 2013, 2:23:20 PM5/23/13
to d3...@googlegroups.com
nevermind figured it out.

I don't need to enter() in the second call, i just need to select and set the 'd' attribute.
Reply all
Reply to author
Forward
0 new messages