Basic HTML5 Chart Example - CanvasJS

Basic HTML5 Chart Example

HTML

<script src="http://canvasjs.com/assets/script/canvasjs.min.js"></script>
<br/><!-- Just so that JSFiddle's Result label doesn't overlap the Chart -->

<div id="chartContainer" style="height: 360px; width: 100%;"></div>
<div id="chartContainer2" style="height: 360px; width: 100%;"></div>

JavaScript

var chart = new CanvasJS.Chart("chartContainer",
    {
      title:{
        text: "Simple Date-Time Chart"
    },
    axisX:{
        title: "timeline",
        gridThickness: 2,
    },
    axisY: {
        title: "Downloads"
    },
    data: [
    {        
        type: "column",
        dataPoints: [//array
        { x: new Date(2012, 01, 1), y: 26},
        { x: new Date(2012, 02, 1), y: 38}
        
        ]
    }
    ]
});

    chart.render();

var chart2 = new CanvasJS.Chart("chartContainer2",
    {
      title:{
        text: "Simple Date-Time Chart"
    },
    axisX:{
        title: "timeline",
        gridThickness: 2,
    },
    axisY: {
        title: "Downloads"
    },
    data: [
    {        
        type: "column",
        dataPoints: [//array
        { x: new Date(2012, 01, 1), y: 26},
        { x: new Date(2012, 02, 1), y: 38},
            { x: new Date(2012, 03, 1), y: 38}
        ]
    }
    ]
});

    chart2.render();