GithubHelp home page GithubHelp logo

Comments (5)

mbostock avatar mbostock commented on April 26, 2024

See these examples

https://bl.ocks.org/mbostock/6498000
https://bl.ocks.org/mbostock/6498580

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.

When asking for help, please include a link to a live example that demonstrates the issue, preferably on bl.ocks.org. It is often impossible to debug from code snippets alone. Isolate the issue and reduce your code as much as possible before asking for help. The less code you post, the easier it is for someone to debug, and the more likely you are to get a helpful response.

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! 🤗

from d3-brush.

SaloniDesai avatar SaloniDesai commented on April 26, 2024

from d3-brush.

mbostock avatar mbostock commented on April 26, 2024

Try this:

https://bl.ocks.org/mbostock/87746f16b83cb9d5371394a001cbd772

You need to use a capturing listener so that your event listener runs before the brush. You need to use brush.move to set the new selection. You need to call event.stopImmediatePropagation to prevent the brush from seeing the mousedown or touchstart event and initiating a brushing gesture after clicking on the background.

from d3-brush.

SaloniDesai avatar SaloniDesai commented on April 26, 2024

from d3-brush.

shasanka avatar shasanka commented on April 26, 2024

Hello All,
What I want from my chart is that when a user selects an area using brush and clicks a button and button state changes to "true", the selected area should no more be able to drag or change until user changes the button start to false.
So, even if user refreshes the page he will be able to see the selected area but unable to drag or remove the selection until button state again changes to "false".

I searched all over the place and couldn't find a solution.

from d3-brush.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.