Resized the legend of graphs based on screen-width