Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect brushed dimension #307

Open
iolaizola opened this issue May 10, 2016 · 1 comment
Open

Detect brushed dimension #307

iolaizola opened this issue May 10, 2016 · 1 comment

Comments

@iolaizola
Copy link

Is it posibble to know which of the axis is the one to trigger the brush event?

Thanks a lot!!

@jmgelman
Copy link
Contributor

Not sure if this will help, but...

On brush or brushend events, you could call brushExtents(). The keys of the returned object should be the axes that have been brushed. This gets updated each time a new axis is brushed (unless brushReset() is called).

parcoords.on("brush", function() {
    console.log(parcoords.brushExtents())
});

Also, earlier this month, I tried to add a brushstart event handler that would return the appropriate dimension object when brushstart fires. See 932f16d. I submitted a pull request for this, but haven't heard anything else back yet. I needed it to be in the brushstart event, but you could probably apply the same idea to brush or brushEnd too.

There might be a simpler way to get the axis being brushed by using d3 selectors, but I'm not really sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants