This was nothing to do with
getBoundingClientRect() but certainly something to be aware of.
window-resize function, the function containing the
getBoundingClientRect() was being called immediately. I needed to set a timeout to ensure the resize had been finished by the browser so that the correct dimensions were then returned.
Definitely worth knowing
- getBoundingClientRect() not returning the correct value on window restore down
- d3.max() not returning the max value in an array?
- d3.max didn't get the correct value
- Why is my call to selection.join() not returning the enter selection?
- Stacked Bar Chart using d3.js stack layout; the bar sections not always in correct place
- Return value from JSON, not the children count
- d3js:The xaxis time is not showing the complete date value
- Line chart not hitting the right value on chart and has a smooth line
- d3 axis not showing tick label if two ticks have the same value
- D3 v4 url(#gradient) not returning the fill color
- Why the maximum variable take the d3.max() value but the minimum one d3.min() does not work properly?
- Why is my D3 SVG not getting the correct width/height from Angular element
- D3 Pie Chart Not Returning Correct Data
- D3js value of .data(...) field does not change on window resize. Is there a way to change it?
- Why does this D3 closure not return the correct attribute
- D3.js text element is not displaying the value of function
- Updating d3 scatterplot, new data points are not in the correct positions
- AngularJS with nvD3 service not returning value
- d3 variable equals the string "function(d)", not the value the function returns
- d3 axis is not showing any values if there is only 1 value in the domain
- d3 function(d) return value from object not from the first index(0)
- d3.js voronoi.clipExtent() is returning the error: undefined is not a function
- x-axis tick is not incremented correctly and it is set to the max value of y
- Line not visible in line chart when having same value in the domain() - using D3
- D3 - Why do circles drawn on top of a map not appear in the correct position?
- d3.select("#element") not working when code above the html element
- getBoundingClientRect returning wrong results
- GetBoundingClientRect but relative to the entire document
- What is the correct way to import and use d3 and its submodules in ES6?
More Query from same tag
- d3.js transition() not working when browser is minimised
- d3 date format for "Aug. 13, 2015, 7:57 a.m"
- Creating a flag swimlane chart in D3.js
- How to make d3 js tree view vertically bottom to up
- Inhibit mouse interactions for certain svg child elements
- D3 v.4 — Compare values from multiple datasets
- D3js Zoom With Manually Drawn Circle
- D3.js version3 scale.ordinal() not reading in my data the way I would like
- How to sort a grouped bar-chart d3js v4
- d3 date histogram from elasticsearch output
- D3 Map - Marks Zooming
- D3v4: indexing and selecting color set by scaleOrdinal
- Appended text is not updated according to CSV file changes
- d3.js zooming mouse coordinates
- d3.js radar chart with images provided in data
- Change which notation d3.format uses for the 'g' type
- Add border-radius property to D3js Donut Chart
- D3 heatmap convert code to use json instead of tsv
- How can I put a country name on the world map?
- How to fill area with custom color under line in nvd3 linechart ?
- Convert SVG to PNG and maintain CSS integrity
- Represent a tree layout using D3
- Some options for making augmented local maps with d3
- How do I pass around data within an object?
- how to get data with tsv or csv to array in d3.js from a txt file?
- deck.gl transitions and filtering
- Circle packing matrix with consistent scale
- Re-load/initiate controller on event in Angular
- How to add labels to my scatterplot from data using d3.js
- D3: Is there a simple way to enlarge a map statically?