JSFiddle - React, Tailwind, and code Playground
HTML
<canvas class="canvas_graph" id="canvasGraph" width="150" height="150"></canvas>
CSS
.canvas_graph{
background: cyan;
}
JavaScript
var canvasGraphElem = document.getElementById("canvasGraph");
canvasGraphElem.width = 300;
canvasGraphElem.height = 200;
var ctx = canvasGraphElem.getContext('2d');
for(var i = 0; i <= 300; i = i + 30) {
ctx.save();
ctx.font = "10px Arial";
ctx.textAlign = "right";
ctx.translate(140, 140);
ctx.rotate(-Math.PI/2);
ctx.fillText(i, 0 + i, 0 - 25);
ctx.restore();
};