Fix line graph size, and dynamically position line graph legend