JSFiddle - React, Tailwind, and code Playground

by akmiecik

HTML

<canvas id="chartBox">

</canvas>

JavaScript

var ctx = document.getElementById('chartBox').getContext('2d');
var myChart = new Chart(ctx, 
{
    type: 'line',
    data: 
    {
        datasets: 
        [{ 
            data: [{t: '2017-10-08 00:00:00', y: 12}, {t: '2017-10-04 00:00:00', y: 12}, {t: '2017-09-28 00:00:00', y: 5}, {t: '2017-09-08 00:00:00', y: 28}],
            borderWidth: 2,
            borderColor: "#3e95cd",
            label: 'Value',
            fill: false,
            radius: 0
        }]
    },
    options:
    {  
        scales: 
        {
                xAxes: 
                [{
                    type: 'time',
                    time: 
                    {
                        unit: 'month',
                        displayFormats: { month: 'MMM YYYY' },
                        max: '2017-10-09 18:43:53',
                        min: '2017-08-02 18:43:53'
                    }
                }]
        },
        legend: 
            {
               display: false
            },
            animation: 
            {
                duration: 0,
            },
            hover:
            {
                animationDuration: 0,
            },
            responsiveAnimationDuration: 0,
    }
});