JSFiddle - React, Tailwind, and code Playground

by Amarnath Shenoy

HTML

<canvas id="GraphPlate" width="600" height="350" style="border:1px solid #d3d3d3;"> Your browser does not support the HTML5 canvas tag.</canvas>

JavaScript

drawCordinates();

function drawCordinates()
{

var width = canvas.width;
var height = canvas.height;
    alert(height);
//Drawing x and Y axis
  var c=document.getElementById("GraphPlate");
var ctx=c.getContext("2d");
ctx.beginPath();
ctx.moveTo(0,0);
ctx.lineTo(0,Number(height));
ctx.stroke();  
        alert('hi');
}