docs: function initCanvas(canvas, config) {
  		var style = canvas.style;
  
  		// NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it
  		// returns null or '' if no explicit value has been set to the canvas attribute.
  		var renderHeight = canvas.getAttribute('height');
  		var renderWidth = canvas.getAttribute('width');
  
  		// Chart.js modifies some canvas values that we want to restore on destroy
  		canvas._chartjs = {
  			initial: {
  				height: renderHeight,
  				width: renderWidth,
  				style: {
  					display: style.display,
  					height: style.height,
  					width: style.width
  				}
  			}
  		};
  
  		// Force canvas to display as block to avoid extra space caused by inline
  		// elements, which would interfere with the responsive resize process.
  		// https://github.com/chartjs/Chart.js/issues/2538
  		style.display = style.display || 'block';
  
  		if (renderWidth === null || renderWidth === '') {
  			var displayWidth = readUsedSize(canvas, 'width');
  			if (displayWidth !== undefined) {
  				canvas.width = displayWidth;
  			}
  		}
  
  		if (renderHeight === null || renderHeight === '') {
  			if (canvas.style.height === '') {
  				// If no explicit render height and style height, let's apply the aspect ratio,
  				// which one can be specified by the user but also by charts as default option
  				// (i.e. options.aspectRatio). If not specified, use canvas aspect ratio of 2.
  				canvas.height = canvas.width / (config.options.aspectRatio || 2);
  			} else {
  				var displayHeight = readUsedSize(canvas, 'height');
  				if (displayWidth !== undefined) {
  					canvas.height = displayHeight;
  				}
  			}
  		}
  
  		return canvas;
  	}