Minor restructure for readability
Made sure we handle the case where only one weight has been added, when drawing the chart.