Inserting last data into chart according to range. but still need to improve shifting points