How much of this task can you do? Can you retrieve the necessary data from the database?
Also, you're going to have to figure out how you plan on creating these bar charts in the first place - such as by using some external library or class(es). There is of course nothing we can do if you can't at least figure out this much, since the solution is going to be largely based on how the 3rd party tool you've selected is to be used.
One possible choice might be Google's Chart API. I have not personally used this API but have seen it recommended in the past.