0
votes

I would like to create a stacked bar chart based on data from a text file USING PHP ... ( The file name must be on the x axis ... n based on the data read inside the file, y axis stack bars must be populated )

If you could provide me with code snippets and suggest the best libraries to use for this specific "dynamic stacked bar graph " creation, it'd be really helpful .

Thanks a lot

2

2 Answers

0
votes

What format is your data in?

I've used, and like pChart (The site has good examples). There is a new version out but I have yet to use that. They can do stacked bar charts

Fusion charts has both a free and paid version. The paid version has stacked bar charts (Not sure about the free) and they have examples on their site.

Both can be dynamic in generating graphs. It really depends on your needs.

If it does not HAVE to be PHP there are javascript options that can read data from a file as well.

0
votes

This is kind of a broad question, and it seems like some Googling might be useful here.

That being said, I'd take a look at Highcharts. It's a JavaScript library that draws graphs based on input data, which can easily be generated using PHP.

I currently use it with a Ruby on Rails app, and it works really well.