Update getcpl.php: add line chart, rearrange graphs. Update functions to write json for line chart.