I don't see why that behaviour was implemented. Any good reason ?
相关问题
- Highlight parent path to the root
- Avoid overlapping of nodes in tree layout in d3.js
- d3.js moving average with previous and next data v
- react-vega and react-vega tooltips
- CSS: element should get max-width before breaking
相关文章
- How to get a Component's own ElementRef for re
- D3.js: Stop transitions interrupting on mouseover?
- Adding text to the center of a D3 Donut Graph
- How do use bootstrap tooltips with React?
- rect collision detection d3js
- Bootstrap input field inside tooltip popover remov
- Pausing and resuming a transition
- D3 grouped bar chart: How to rotate the text of x
In order to have a brushing function, a transparent rectangle that captures all mouse events has to be drawn over top of the graph. That prevents any mouse events from triggering the tooltip event handler on the main graph elements, and is the reason the dc.js API warns that leaving brushing behaviour "on" will disable all other interactive behaviour.
If you want both behaviours, consider using a focus + context layout. That example uses plain d3, but you could recreate it with dc.js. Just have two different views of the same data, one with the brush and one with the tooltips or other interactivity.
You can use https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events to block 'mouseover' event for brush so that tooltips are enabled. Then on chart you can create a custom 'mousedown' event and pass it to brush to enable selection
I had a similar issue using d3 code. I realized that moving the tooltip event after the brush event fixed the problem. For me, it looked like this:
This code allowed brushing, but retained the ability to hover over a circle element and see metadata.