improved bar chart. Added using d3-tooltip library
moved preparing data for charts to service