Here you go:
Just changed the relevant code in two spots to:
d3.select("#tooltip") .select("#keyword") .style("color", d3.select(this).style("fill")) .text(d.keyword);
- D3js Use element's current color in tooltip
- How do I remove all children elements from a node and then apply them again with different color and size?
- How to use D3js on server side to generate SVG directly?
- How to update the fill color on existing svg elements with d3.js?
- How to change line color in d3js according to axis value?
- How to make a color scale in D3 JS to use in fill attribute?
- Adding child elements to specific nodes in a force-directed graph using d3js
- How do I use D3js in Wordpress?
- How can I choose a legible color to draw text on a bar in a d3js chart?
- D3js : mouseover of one element change opacity of several others elements
- Interacting with a tooltip in d3js v4
- How to use D3 force layout with existing SVG elements as nodes
- Mouseover issues in D3.js, containing Path elements and changing tooltip data once focus is brushed?
- How to Use D3 elements inside SAPUI5 , when using JS views?
- How to make a color gradient bar using d3js
- D3js Line graph doesn't go through all of my points when I use .interpolate('basis')?
- d3js gantt chart with date/time scale at the top and current day blue line
- use d3js to update text in div tag
- How to change text color of legend in d3js graph?
- Assign element specific boolean values to determine if element has been previously clicked - current code blanket updates all elements
- d3 svg elements on top of background color (but not content) of separate HTML element
- d3js make tooltip stay when clicked
- 3d.js (Force) - get current mouse position on the link for the tooltip
- Creating single tooltip for multiple elements
- Use custom function to create elements in d3.js
- d3js - How to use the `this` keyword or what is the alternate?
- D3JS including previous elements of legend
- Can I use selectAll to create new element when elements of same type already exist?
- Is it possible to use d3.js drawn elements as Isotope components
- Four color theorem in D3js for neighbors polygons coloring?
More Query from same tag
- D3.js Plotting Multiple Data Sets from Separate Files
- Plot data using D3.js and AJAX
- d3.js Bottom to Top force layout - drag behavior
- tbody tag element returns empty when generating basic table using D3
- d3.js CSV to HTML Table - Header, Average & chart
- How do I create a custom force that constrains nodes to a specific area within an SVG?
- Data driven colour in D3.JS SVG circles
- Creating interactive floor plan using d3.js (or similar)
- Drawing bar charts vertically after each other d3.js
- Directly render and serve d3 visualizations from a nodejs server
- Draw properly sized rectangle around text
- Curve d3 line animated using tweendash
- D3.js appending wrong location
- d3.js change format of price and date
- Understanding nvd3 x-axis date format
- How to use d3.js to select an svg element and modify its attr?
- d3 append an array of text
- How to correctly reuse D3.js component in Angular 2?
- D3 returns no JSON objects
- D3.js : Line Generation with dates
- D3 create buttons from an array of string containing names
- Using recorded mouse coordinates to draw on d3 canvas
- d3 hover text to clippath
- Nearest neighbor search in D3
- Updating graph in d3
- How to pass a Json String from mvc controller to a d3.js chart?
- D3: Issue while Displaying a Line chart inside tooltip
- Trying to user scatterplots in a d3 chart with brush/zoom
- How can a tooltip in D3 fetch data dynamically?