Refactored line chart