Basic HTML5 Chart Example - CanvasJS

Basic HTML5 Chart Example

HTML

<script src="http://canvasjs.com/assets/script/canvasjs.min.js"></script>
<div id="chartContainer" style="height: 360px; width: 100%;"></div>

JavaScript

var chart = new CanvasJS.Chart("chartContainer", {
    
    data: [{
        name: "me",
        type: "stackedColumn",
        xValueType: "dateTime",
        dataPoints: [{
            x: 1384995600000,
            y: 11.95
        }, {
            x: 1384999200000,
            y: 25.48
        }, {
            x: 1385002800000,
            y: 12.3
        }, {
            x: 1385006400000,
            y: 14.51
        }, {
            x: 1385010000000,
            y: 20.14
        }, {
            x: 1385013600000,
            y: 3.95
        }, {
            x: 1385017200000,
            y: 8.27
        }, {
            x: 1385020800000,
            y: 10.93
        }, {
            x: 1385024400000,
            y: 11.51
        }, {
            x: 1385028000000,
            y: 25.92
        }, {
            x: 1385031600000,
            y: 21.64
        }, {
            x: 1385035200000,
            y: 18.34
        }, {
            x: 1385038800000,
            y: 11.13
        }, {
            x: 1385042400000,
            y: 14.1
        }, {
            x: 1385046000000,
            y: 18.69
        }, {
            x: 1385049600000,
            y: 3.42
        }]
    }, {
        name: "you",
        type: "stackedColumn",
        xValueType: "dateTime",
        dataPoints: [{
            x: 1384995600000,
            y: 2.75
        }]
    }]
});

chart.render();