Add median calculation to line chart.