Simple javascript class for building a barchart.