refactored the linegraph drawData_ method out of draw and redraw