Basic Column Chart - CanvasJS

Basic Column Chart

by Preeti_Patial

HTML

<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<button type="button" onclick="hello()">TodayData</button>
<div id="chartContainer" style="height: 360px; width: 100%;"></div>

JavaScript

function ajax_statistics_graph_data(){
alert("hello");
	/* var GraphData=[];
	$.ajax({type:"POST",url:"here_is_my_php_file_path",data:{Actval:Actval},
	  success:function(ajax_data){
	    
	    
	    // var GraphDataPoints =  JSON.parse(ajax_data);
	    GraphData.push({name:"Total Patients",type:"column",lineThickness:1,color:"#F16D0C",markerSize:0,axisYType:"primary",axisYIndex:0,dataPoints:[ "{x:new Date(2020,02,24),y:2},"]});
	    var chart_appointments = new CanvasJS.Chart("chart-appointments", {
	      animationEnabled: true,
	      axisX:{
	        // interval: 1,
	        // intervalType: "hour",
	        valueFormatString: "DDDD",
	        interval: 1,
	        intervalType: "day"
	      },
	      axisY:{gridColor:"#aaa",gridDashType:"dot",titleFontSize:12,titleFontWeight:600,labelFontSize:11,valueFormatString:"####0.#",minimum:0},		
	      toolTip:{enabled:true,shared:true,fontSize:11,borderThickness:1},	
	      data:GraphData
	
	    });chart_appointments.render();
	}}); */
}
function hello(){
console.log("hello jsfiddle");
}