I would change
.attr("fill", "yellow") to
Using .attr() results in
<rect fill="yellow" ...> instead of
<rect style="fill: yellow;" ...> which might be causing your problem.
- Replace the last bit of jQuery with d3.js - a selection with css-attribute change
- Change the height of rect element drawn by d3.js with a jQuery ui slider
- change the style with 'selectAll' and 'select' problems
- How do you change the last tick value in D3.js?
- New layout after opening a group not base on the last layout with cola.js
- Replace the decimal dot with a comma on an axis in D3?
- Why does a CSS transform,translate change the rotation for rotated elements?
- Change the size of a symbol with a transition in d3.js
- Change the Class attribute
- D3 How to update the chart after selection from drop down menu with new data
- force directed graph - why pointers change size along with the link width
- D3.js .rangeBands() returning 'undefined' with only the last value?
- How can you change the height of an x-axis with d3.js
- How to find the highest attribute in a dataset, then display the "name" associated with that
- DC.js choropleth map chart CSS conflicting with colouring, no map showing. How can I turn off the fill:none?
- C3.js : Jquery change method with 2 dropdown list
- Style a d3 element with jQuery and CSS
- In my d3 chart, Zoom selection disappears when I change the brush and click on not selected range
- vertical bars not aligned with the x-axis label and last bar rendered outside the x-axis range - D3 js - simple bar with fixed width
- How to change the CSS "animation-delay" property in D3?
- How can I change the attribute of the circle node in d3.js?
- how to change the color of circle to back with original color on clicking of another circle in D3 Js chart
- Page doesn't load at the right place; jquery code to do with it?
- Is it possible to change the size of a div dynamically with D3?
- i change the "class" attribute of a node that exist in SVG, but not applied ! why?
- i can't change the colors on the lines in a multi line graph with d3
- D3, Change the style of collapsible tree attribute
- Using D3.select to change the thickness of text in a radial dendrogram with a mouseover
More Query from same tag
- Renderer2 does not render SVG element while using d3 js - Angular 4
- How does datamaps display images instead of bubbles?
- Multiple D3 draggable/zoomable trees on one page using Angular
- D3js projection issues when fitting to BBox
- How to show many links separate by value in D3.js forced directed graph
- D3 setting stroke-dasharray through CSS
- How do I change the colour of markers (arrow heads)?
- Popup on click with D3 Force Layout
- producing a "live" graph with D3
- D3 forced layout zoom and pan not working
- d3.js binary tree with HTML as the nodes
- D3 v4 .rangeBand() equivalent
- Event handlers not responding
- d3.js functions not working with div id
- how to get rid of overlap line graph in d3js
- D3: can create a subset of elements, but not update them
- How to add an html form in D3?
- D3.js - How to map continuous domains to discrete ranges with scales?
- from 1 d3.select hide another div
- make d3 force static layout more quickly
- How to add progress bar inside a tree structure node or on mouse hover in D3
- d3 js tree layout multiple parents
- Are D3 value keys matched in the same way that default index numbers are when using enter()?
- D3 update color based on data
- Display value of d3.interpolate
- Deleting d3 svg elements for redraw
- how many different key pair values in a json object using d3 or jquery
- How do I produce an interpolation function given n data points?
- D3JS how to get the y postition with bisector?