fix redrawing of chart