improve graph when we select a range