add: a real API for create barchart