done refactoring of drawlinechart