fix the chart redraw flicker