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", {
                    
                    
                    title:{
                        text: " Users"
                    },
                    legend: {
                        horizontalAlign: "right", // "center" , "right"
                        verticalAlign: "center",  // "top" , "bottom"
                        fontSize: 15
                    },
                    axisX:{
                        title: "time",
                        gridThickness: 1,
                        //valueFormatString: "hh:mm:ss"
 
                    },
                    
                    //data is given by the php file.
                    //It has to be a JSON format!
                    data: [
                        {
                            showInLegend:true,
                            legendText:"Used Lic.",
                            //xValueFormatString: "hh:mm:ss",
                            type : "line",
                            xValueType: "dateTime",
                            dataPoints: [
                               ...