This is entirely JavaScript, so if you have your data in other format you'll first have to convert to JS:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <div id="bars"></div> <script type="text/javascript"> //<![CDATA[ $(function (){ var values = [234, 654, 432]; var maxValue = values[0]; for(var i = 0; i < values.length; i++){ maxValue = Math.max(maxValue, values[i]); } for(var i = 0; i < values.length; i++){ var newBar = $("<span>").html(values[i]); newBar.css({ "display": "block", "width": "0px", "backgroundColor": "#600", "marginBottom": "5px", "padding": "2px", "color": "#FFF" }); $("#bars").append(newBar); newBar.animate({"width": (100 * values[i] / maxValue) + "%"}, "slow"); } }); //]]> </script>
Just written and tested in Opera 10.
Of course, it'd be better if you adjusted all possible CSS rules in a separate file, such as a nice background, margins between bars, text color, etc., but this is just a demo.