Reworked genereting line charts.
Added legend to line chart.