How to draw a histogram or bar chart using php / MySQL ?
Hi all,
I have a table with a variable 'age' and I want to select the data and draw a histogram or bar chart of the number in each category, using stars like this:
20-25 ****
26-3 *********
31-45 **
Could anyone give me an example of how to write this in php / MySQL?
Status:
Open Aug 17, 2009 - 09:40 PM
PHP, mysql
4answers
Answers
Aug 17, 2009 - 11:14 PM
Hi there,
please check the link below one for demo and another for download code, if it is ok than you can customize with your requirement.
Demo:http://www.shashionline.in/demo/barchart.php
Code Download:http://www.shashionline.in/download/barchart_php.txt
Hope this will help you.
Aug 19, 2009 - 04:18 AM
Thank u shashi for ur response,
I have seen the demo and also tried the code. It's cool but it doesn't display the bar chart.... i don't know what's problem in the code.
Mar 31, 2012 - 11:00 AM
The question looks to be abandoned by the user who asked it. If no action is taken within 2 days, a Quomon Moderator will consider closing the question and distributing the points.
The Quomon Team
Answer this question
Share Your Own Experience & Expertise
We look to ensure that every question is answered by the best people with relevant expertise and experience, the best answers include multiple perspectives. Do you have relevant expertise or experience to contribute your answer to any of these commonly asked questions?
Add New Comment