Additional features and bug fixes to support bar charts and legend.