Refactoring LineChart