} //GetPlotRectangle /// <summary> /// Converts a ChartLine object to a ChartPolygon object that has /// one edge along the bottom Horizontal base line in the plot. /// </summary> /// <param name="chartLine"></param> /// <returns></returns> public static ChartPrimitive ChartLineToBaseLinedPolygon(ChartPrimitive chartLine) { ChartPrimitive chartPolygon = chartLine.Clone(); Point firstPoint = chartPolygon.Points[0]; firstPoint.Y = 0; Point lastPoint = chartPolygon.Points[chartPolygon.Points.Count - 1]; lastPoint.Y = 0; chartPolygon.InsertPoint(firstPoint, null, 0); chartPolygon.AddPoint(lastPoint); chartPolygon.Filled = true; return(chartPolygon); }