JSFiddle - React, Tailwind, and code Playground

by paislee

HTML

<canvas id="plot"></canvas>

CSS

body { margin:100px; }

article, aside, figure, footer, header, hgroup, menu, nav, section { 
    display:block;
}

#plot {
    width: 500px;
    height: 400px;
}

JavaScript

window.onload = function() {
    var c = document.getElementById("plot");
    var ctx = c.getContext("2d");
    ctx.fillStyle = "#f00";
    ctx.fillRect(0, 0, 175, 40);
}