refactored line chart (removed typed parameter)