Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
kjhkjhkjh
let svg = d3.select('#chart')
.append('div')
.classed('svg-container', true)
.append('svg')
.attr("preserveAspectRatio", "xMinYMin meet")
.attr("viewBox", `0 0 ${width} ${height}`)
.classed('svg-content-responsive', true)
.append('g')
.attr('transform', `translate(${margin.left}, ${margin.top})`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment