Some fixes to make legend icons appear in the correct place; still issues with Rect taking up extra space before graph