constrain pH to valid range when dragging the graph indicators