Make chart image size dynamic

It now depends on the maximum distance of icons from the chart