fixed chart drawing issue