JSFiddle - React, Tailwind, and code Playground

by DPariya

HTML

<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="utf-8" />
    <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta name="description" content="Web site created using create-react-app" />
    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />

    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />

    <title>My App</title>
  </head>

  <body>
    <noscript>You need to enable JavaScript to run this app.</noscript>
    <div id="root">
      <canvas id="canvas"></canvas>
    </div>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.27.0/moment.min.js" integrity="sha512-rmZcZsyhe0/MAjquhTgiUcb4d9knaFc7b5xAfju483gbEXTkeJRUMIPk6s3ySZMYUHEcjKbjLjyddGWMrNEvZg==" crossorigin="anonymous"></script>

    <script src="https://unpkg.com/chart.js@2.9.3/dist/Chart.js"></script>
    <script src="https://unpkg.com/chartjs-plugin-annotation@0.5.7/chartjs-plugin-annotation.js"></script>
    <script src="https://unpkg.com/chartjs-plugin-draggable@0.1.6/dist/chartjs-plugin-draggable.js"></script>

    <script>
      const data = {
        datasets: [

          {
            type: "line",
            label: "Test",
            backgroundColor: "#0000FF",
            borderColor: "#0000FF",
            borderWidth: 1,
            pointRadius: 0,
            tension: 0.4,
            fill: false,
            data: [{
                x: "2022-04-01",
                y: 0,
              },
              {
                x: "2022-05-01",
                y: 20,
              },
              {
                x: "2022-06-01",
                y: 30,
              },
              {
                x: "2022-07-01",
                y: 40,
              },
              {
                x: "2022-08-01",
                y: 50,
              },
              {
                x: "2022-09-01",
                y:...