Merged updateLineChart functions