how to set chart js canvas width on complete code example Example: chartJs height var ctx = document.getElementById("myChart"); ctx.height = 500;