Page 1 of 1
Draw chart
Posted: Sun Jan 16, 2005 8:45 pm
by S_henry
Let say I have data about student's mark in several subjects. If I want to represent that data (eg. english=82, math=91) using chart (eg. bar chart) in my page, what is the best way to do it? I mean how can I draw chart using that data?
Posted: Sun Jan 16, 2005 8:53 pm
by feyd
I believe JPgraph is the most common used charting tool..
Posted: Sun Jan 16, 2005 9:43 pm
by rehfeld
yeah take a look at jpgraph, its a really nice little tool.
its easy to use even though the documentation may seem intimidating.
but if all you need to do is very basic bar charts, its pretty easy to do it yourself with just html
Code: Select all
<table style="border: 1px solid #000;">
<tr>
<td>Math score</td>
<td><div style="width: <?php echo $math_score; ?>px; background-color: orange;"></div></td>
</tr>
<tr>
<td>English score</td>
<td><div style="width: <?php echo $eng_score; ?>px; background-color: blue;"></div></td>
</tr>
</table>
Posted: Mon Jan 17, 2005 12:41 am
by AGISB
If you need the bars functioning in older browsers as well you can also consider using small colored gifs that you place in a table with the width you need.
Posted: Tue Jan 18, 2005 8:44 pm
by S_henry
Because of time constraint, I'll use rehfeld method at this time. And of course I'll study other suggestions after this. Thanx guys..