Changed padding around graphs to constant 5px on all sides to avoid collision between graph and border.