made line graph dynamic