render()  method just once in the beginning even with empty array, then call the updateSeries()  method in ajax call to update data of the chart. var options = { 	 series: [{ 	   name: 'Completed trips', 	   data: [] 	 }, { 	   name: 'Cancelled trips', 	   data: [] 	 }], 	 chart: { 	   height: 350, 	   type: 'bar', 	   toolbar: { show: false }, 	   zoom: { enabled: false } 	 }, 	 plotOptions: { 	   bar: { 		 horizontal: false, 		 columnWidth: '55%', 		 endingShape: 'rounded' 	   }, 	 }, 	 dataLabels: { enabled: false }, 	 stroke: { 	   show: true, 	   width: 2, 	   colors: ['transparent'] 	 }, 	 fill: { colors: ['#ffc074', '#6e6e6e'] }, 	 markers: { colors:  ['#ffc074', '#6e6e6e'] }, 	 legend: { 	   markers: { fillColors: ['#ffc074', '#6e6e6e'] } 	 }, 	 noData: { text: 'Loading...'}, 	 xaxis: { 	   categories: ['Jan','Feb', 'Mar', 'Apr', 'May...
 
Comments
Post a Comment