<canvas id="myChart" style="max-width: 500px;"></canvas>
var ctx = document.getElementById("myChart").getContext('2d');