BZ-11716: Add condition to draw the pie chart