score:0
Accepted answer
a partial answer is to add delay before removing tags, as proposed above. this can be done on the node variable with:
.on("mouseout", function(d) {
d3.select("#"+d.name).selectall(".tool")
.transition()
.delay(800)
.remove();
})
it's also better to reduce the overlap between tags and parent node (in drawtags) because mouseover is on the parent node only, tags are considered out.
var x = math.sin(rscale(d))*50; // vs. 40px previously
var y = math.cos(rscale(d))*50;
change the mouseover event on tags to a click event and make tags and text only receive click pointer-events with .attr("pointer-events", "click")
.on("click", function(d) { alert(d); });
Source: stackoverflow.com
Related Query
- How to create clickable elements displayed on mouseover?
- How to create elements depending on data in D3?
- d3.js - How can I set the cursor to hand when mouseover these elements on SVG container?
- In d3 for javascript, how do you create different elements for your data?
- How to create SVG elements of different types based on data?
- In D3, how can I create multiple elements for each data element based on value in data?
- How to create tooltip in D3 to get image on MouseOver on a node in a Graph
- d3/dc.js - How to create a stacked bar chart while telling crossfilter to treat elements in an array as separate records?
- How do you prevent the interference of MULTIPLE SVG elements (text labels) on mouseover of a different SVG element?
- On a Google maps overlay, how do I create lines between svg elements in D3
- How to make SVG:A elements clickable when using D3.js Pan & Zoom behaviour?
- D3: how to create input elements followed by label text?
- How do I dynamically update displayed elements in D3
- How to create elements (links) with 2 or more colors with CSS to make it look like a rainbow?
- How to create a d3.js legend with both solid and dashed elements
- How to change properties of elements in a SVG when I mouseover an element of a second SVG using D3
- How to simultaneously update the color of elements in a SVG when I mouseover elements of a second SVG using D3
- How to create variable number of image or circle elements in an SVG element using a loop in D3 js(v3)
- How to create a common area between elements in d3.js?
- How to add a click event or mouseover on dynamic elements ( enter/update/exit )?
- d3.js Trying to create a grid and don't know how to access certain elements or bind to columns
- How do I remove all children elements from a node and then apply them again with different color and size?
- How do you create a family tree in d3.js?
- How to add border/outline/stroke to SVG elements in CSS?
- How to create "svg" object without appending it?
- d3.js - how to insert new sibling elements
- How to update elements of D3 force layout when the underlying data changes
- How do I create a continuous Github-like calendar with Cal-Heatmap?
- How to create floor plans that work nice with mobile and desktop browsers?
- How do I create a tree layout using JSON data in d3.v4 - without stratify()
More Query from same tag
- D3.js: misplaced labels
- JavaScript/JQuery select child
- How to animate range input element properly?
- how to change line in javascript
- Parse Date by YEAR-WEEK pattern in JavaScript and D3
- How do I clone an element or chunk of dom?
- Returning value for given key in js and d3 - do i have to loop?
- D3.js doesn´t draw graph after changing source from tsv to JSON
- Display all stacked area data in popup on mouseover in d3.js
- Why are cross-origin Image requests blocked by Cytoscape.js but not by d3.js?
- Interactive sorting of grouped bar chart in D3js
- how to append option into select combo box in d3
- Get all dom nodes from d3 selection
- D3.js and dragdealer JS
- Why is the line not changing?
- How to auto update sub elements datum binding in D3
- D3 Number Format with Using HTML Unicode Expressions
- d3 barplot - why are labels not showing ?
- Grouped Bar Chart with negative value d3
- Access a specific path element using given ID
- set maximum value for c3js scatter chart plot size
- Switch for making background map from Mapbox visible/invisible in D3
- Selecting a section of data from CSV in d3.js
- Angular directive for D3 datamap rendering only once
- Search into a node ID in D3
- Recursive function and this D3.JS
- Skip inclusion of d3.js for Internet Explorer
- How to use create and use a function within d3.js
- Moving connected rectangles in d3js
- How to make hierarchical/zoomable ticks in D3?