Updated bar chart example to use new API
Implemented removeListener