object oriented js in-progress (todo:add chart as a mixin)