Inspired by http://ux.stackexchange.com/questions/3736/how-to-build-a-budgeting-interface-sum-of-items-must-equal-100 Example: <div id="widget_container"></div> <script> // Available types: "totals", "relative", "relative2", "relative3", "relative4" var widget = new BudgetAllocationUI("widget_container", "relative"); widget.addBar("Foo", 10); widget.addBar("Bar", 20); </script> Demo: http://buger.github.com/budget_allocation_ui/