add zooming limit and fix bugs in the chart zooming