Refactoring of sources tab: factor out line chart