fix #2: use bar.data and not data for rendering chart to ensure that possible slicing is taken into account