set range for chart