ss="language-js d-none d3v4-chunk"><code id="code-js-v4" contenteditable="true"><xmp><script>

// select the canvas and the container element
var canvas = document.getElementById('my_dataviz');

// Get the 'context'
var ctx = canvas.getContext('2d');

// A function that finishes to draw the chart for a specific device size.
function drawChart() {

  // get the current width of the div where the chart appear
  var width = parseInt( d3.select('#my_dataviz').style('width'), 10 )

  // Set the canvas height = h