Fix barchart out of range issue.