finally fix chart bug