updated coloredlinechart to draw straight line if data points are only 2