Refactoring of sources tab: factor out line chart part 2