0 Replies Latest reply on Feb 15, 2012 7:20 AM by Kuan_87

    How to create a vertical bar chart from a table? (PHP, HTML and CSS)

    Kuan_87 Level 1

      Hi everyone,


      I have created a table and wish to proceed to do it even better in terms of analysis pattern. I want

      to create a vertical bar chart from the created table but I dunno how to start it.


      Here is the code for the table:



      <!doctype html>
      <html lang="en">
            <meta charset="utf-8">
            <meta name="viewport" content="width=1024">
            <title>Feng Mentor Mentee</title>
            <div id="wrapper">
               <div class="chart">
                  <h3>GPA Performance Graph</h3>
                  <table id="data-table" border="1" cellpadding="10" cellspacing="0"
                  summary="The performance of students throughout the years in university">
                           <td> </td>
                           <th scope="col">Year 1</th>
                           <th scope="col">Year 2</th>
                           <th scope="col">Year 3</th>
                           <th scope="col">Year 4</th>
                           <th scope="col">Year 5</th>
                           <th scope="row">Sem 1</th>
                           <td><?php echo $gpa11;?></td>
                           <td><?php echo $gpa21;?></td>
                           <td><?php echo $gpa31;?></td>
                           <td><?php echo $gpa41;?></td>
                           <td><?php echo $gpa51;?></td>
                           <th scope="row">Sem 2</th>
                           <td><?php echo $gpa12;?></td>
                           <td><?php echo $gpa22;?></td>
                           <td><?php echo $gpa32;?></td>
                           <td><?php echo $gpa42;?></td>
                           <td><?php echo $gpa52;?></td>


      Here's the look:



      GPA Performance Graph

      Year 1Year 2Year 3Year 4Year 5
      Sem 1
      Sem 2


      Please help me on this because this is my 1st project on php.