score:-1
Accepted answer
You can do it by requesting transformation matrix of the element:
const matrix = select('g').node().transform.baseVal.consolidate().matrix
const translateX = matrix.e
const translateY = matrix.f
const scale = matrix.d
Here is a more detailed explanation.
Source: stackoverflow.com
Related Query
- Get transformation from node in d3
- How can I get the dom svg element from d3 node data?
- Get all the data from a clicked node in C3JS
- How to get parent node from child in json using d3js as Force Layout?
- How do I remove all children elements from a node and then apply them again with different color and size?
- How to get data of parent node in d3.js
- Get one element from d3js selection, by index
- Unable to get node datum on mouseover in D3 v6
- clicking a node in d3 from a button outside the svg
- D3 get attributes from element
- How to get maximum value from an array of objects to use in d3.scale.linear().domain()
- In d3, how to get the interpolated line data from a SVG line?
- Get arrowheads to point at outer edge of node in D3
- Get data from rest service using D3
- D3js: how to get Lat/Log geocoordinates from mouse click?
- D3: Get nearest value from ordinal axis on mouseover
- Get innerHTML from selection
- Get all dom nodes from d3 selection
- d3.js: get tick format from time scale
- Get an array of points from D3 line()
- How to get the same node positions in d3's force layout graph
- How to assign the x-axis position of a node in a Sankey Diagram (D3) from the json file
- d3.js get JSON from url
- Does the d3 treemap layout get cached when a root node is passed to it?
- How to get translate property from a group?
- How to get the data from the c3.js
- Javascript: Array of dictionaries, get all key value pairs from one dictionairy with condition
- Create data visualizations using Express and get data from a PostgreSQL database
- How to create tooltip in D3 to get image on MouseOver on a node in a Graph
- Get width from element using D3.js
More Query from same tag
- D3 stacked bar graph, with each stack a different colour set by the different groups,
- Multi-Level/Grouping of Axis Labels Using d3
- g group element doesn't start at 0,0 inside the svg
- Fixed svg in the bottom of a nested svg
- How topojson's world map scale has set?
- Applying css to the ticks and line of an axis
- DC.js bar chart x-axis labels not aligned with bars
- Why do equal-duration d3 transitions get out-of-sync?
- categorical data with D3 scale
- axis scale in cubism context in d3.js
- d3.js: how to use data from the parent node? (to show the grouped bar name at the individual bar tooltip)
- Why d3.transition() has no effect where theUpdateSelection.transition() works?
- Summing arrays in JavaScript using d3.nest() Part II
- How to display negative values in a d3 bar chart?
- How to add text on top the heatmap to properly show value for each rectangle when using D3.js?
- d3.js formatting data label on clustered chart
- yScale not acting consistently d3.js
- In D3 force-directed layout, how can I position fixed nodes programmatically, without dragging?
- What's the best way to make a d3.js visualisation layout responsive?
- Why is my <path> line not appearing on my d3 line chart?
- How to scale SVG elements separately.
- SVG layer not rescale width map layer
- D3.js Updating onclick other element
- d3.js: Is there a way to get a linear color-output for an array of elements?
- charts not renderring in django-nvd3
- DC JS : How to highlight rows in an aggregated data table on click, similar to a row chart?
- D3.js breaking up overlapping shapes
- how to move circles(data points) in d3.js
- How to plot a directed Graph in R with networkD3?
- Conditionally render a text element if a certain property is present in the data