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

brush.extent() returns error thing in d3.v4.min.js #26

Closed
suyue0731 opened this issue Mar 9, 2017 · 1 comment
Closed

brush.extent() returns error thing in d3.v4.min.js #26

suyue0731 opened this issue Mar 9, 2017 · 1 comment

Comments

@suyue0731
Copy link

I have pasted the code in https://bl.ocks.org/mbostock/34f08d5e11952a80609169b7917d4172 to my project and added "console.log(brush.extent())" in line 100.

But the script returns "function (){return t}" as the code in d3.v3 would return an array

d3bug

@mbostock
Copy link
Member

mbostock commented Mar 9, 2017

Please read the documentation for brush.extent and the major changes to d3-brush as part of the 4.0 release. The functionality you are looking for is called the current brush selection (not to be confused with a D3 selection), and can be retrieved using d3.brushSelection or as event.selection on a brush event.

If you have further questions, please use Stack Overflow tag d3.js to ask for help. Although I make an effort to assist everyone that asks, I am not always available to provide help promptly or directly. Stack Overflow provides a better collaborative forum for self-help: tens of thousands of D3-related questions have already been asked there, and some answered questions may be relevant to you.

If you have a question about D3’s behavior and want to discuss it with other users, also consider the d3-js Google Group or joining the d3-js Slack.

Thank you! 🤗

@mbostock mbostock closed this as completed Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants