Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var aspectRatio= '16:9';
var viewBox = '0 0 ' + aspectRatio.split(':').join(' ');
var svg = d3.select('#example-4')
.append('svg')
.attr('width', '100%')
.attr('viewBox', viewBox);
// draw the background
// orange
svg.append('rect')
.style('fill', 'orange')
.attr('width', '100%')
.attr('height', '100%');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.