syntagmatic/parallel-coordinates — pull request #59 by bbroeksema (2014-09-03 12:29:18+00:00)
Title: Pass an index to the color function.

@syntagmatic I don't think this is too invasive, but I didn't want to merge this one right away. Please have a look and tell me what you think. The reason I create __idx__: using the index passed by map at various places doesn't work in the case of queued rendering. If you're okay, I'll push it to your repo, otherwise I'm open for discussion to solve this in a different way. (Obviously, I added this because I need it in the application I'm working on).

Commit message:

Most, if not all, d3 functions have a callback in the form (d, i), where d
is the data item and i the index. This commit implements similar behavior
for the color function. This allows the implementation of color functions
that rely on the index.