I really like this graph and its functionality, and it is perfect for what I want / need. The only thing I need to change is I need to allow ordinal data on the y axis, and I can't get this to work (I'm a newbie).
When I change the y scale from linear to ordinal:
yscale[k] = d3.scale.linear() .domain(d3.extent(data, function(d) { return +d[k]; })) .range([h, 0]));
to
yscale[k] = d3.scale.ordinal().rangePoints([h, 0]), yscale[k].domain(data.map(function(d) { return d[k]; })))
The purge still appears and works on its own, but does not filter, leaving the selected lines. No lines appear, if I did not move them to the very top of the axis, then all or almost all will appear. When I went through the code with firebug, it looks like it just didn’t get the lines that were in the brush area, but all (?) ... and I can’t understand. :(
If anyone could help with this (especially all the places that I need to change and how), I would like this work and find out what I'm doing wrong: - \
source share