fix taking data for pie & bar charts #6