graph finally works including the text field to change range