Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var aspectRatio= '16:9';
var viewBox = '0 0 ' + aspectRatio.split(':').join(' ');
var svg ='#example-4')
.attr('width', '100%')
.attr('viewBox', viewBox);
// draw the background
// orange
.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.