I recently wrote a jQuery Plugin that I am calling jquery_comphist. It is a jQuery Plugin that draws a Comparative Histogram of a provided population divided into two major groups with any number of shared sub-groups. One of the most common uses for such a feature is when you are trying to display demographics data on some population. Anyways, as usual the code is available here (jquery.comphist.js, jquery.comphist.css) and you can see an example of it below.
With the jQuery Comparative Histogram (CompHist) Plugin you can easily
represent populations and information about them. A prime usage exampe of this
is demographics. All the styling is done via CSS. Hence the style is easily
modified. It does the calculations for you and it allows for non listed group
counts via a
non_demo_count data option.
Note: In the above snippet the href values are likely to be different in your case. The second code snippet is simply a single line of HTML where the div that is to be the Comparative Histogram. It is key that this div has an id that is easily referenced and a set height and width. An example of this snippet is as follows:
<div id="compplaceholder" style="width: 375px; height: 200px;"></div>
Hopefully, the example helps get you up and running quickly.