test code for drawing a line chart