Posts

Showing posts with the label chart

Dynamic Chart Using PHP-Xampp Mysqli database and visualizing line chart.

Image
Objective of this blog: To build a simple line graph using the values fetched from MYSQL-Xampp database table. Why I created ? As I need chart to visualize the percentage of marks obtained by the student.I searched over the internet for dynamic code but I could not get it.So I modified the code from  https://developers.google.com/chart/interactive/docs/gallery/linechart   from its static code into dynamic by the follow I have created a database named as chart with table name as analysis with 6 columns as name (varchar 30) ,a1 (int ) ,a2 (int ) ,a3 (int ) ,a4 (int ) ,a4 (int ) ,a5  (int ) Caption:Database 1) Develop a php program as linep.php <?php $con=mysqli_connect("localhost","root","","chart"); //connection if($con) {  $query = "SELECT * from analysis"; //select the records from table  $result = mysqli_query($con,$query); //initializing variables  $a1=0;  $a2=0;  $a3=0;  $a4=0;  $a5=0;  $count1=0; //counting the number of ...