Fixed the graph component

Fixed the graph component to update maximum values when models change.
Also tried to fix a local issue with Chrome and the number-type input
box, but the current solution is not cross browser compatible.