fix barchart bug