 				}
 			}
 			graphics.endFill();
-//			graphics.moveTo(tempPoint.x, tempPoint.y);
-		}
-		private static const tempPoint:Point = new Point(); // reusable object
+			
+			prevPoint.x = tempPoint.x;
+			prevPoint.y = tempPoint.y;
+		}
 	}
 }
 

	import weave.api.registerLinkableChild;
	import weave.api.reportError;
	import weave.api.setSessionState;
	import weave.api.ui.IPlotter;
	import weave.compiler.StandardLib;
	import weave.core.DynamicState;

		
		public const fill:SolidFillStyle = newLinkableChild(this, SolidFillStyle);
		
		override public function drawPlotAsyncIteration(task:IPlotTask):Number
		{
			// this template will draw one record per iteration
			if (task.iteration == 0)
			{
				if (!task.asyncState)
					task.asyncState = {};
				if (!task.asyncState.prevPoint)
					task.asyncState.prevPoint = new Point();
				var p:Point = task.asyncState.prevPoint as Point;
				p.x = p.y = NaN;
			}
			prevPoint = task.asyncState.prevPoint as Point;
			return super.drawPlotAsyncIteration(task);
		}
		
		private var prevPoint:Point;
		public var connectTheDots:Boolean = false;
		
		/**
		 * This function may be defined by a class that extends AbstractPlotter to use the basic template code in AbstractPlotter.drawPlot().
		 */
		override protected function addRecordGraphicsToTempShape(recordKey:IQualifiedKey, dataBounds:IBounds2D, screenBounds:IBounds2D, tempShape:Shape):void
		{
			var graphics:Graphics = tempShape.graphics;
			graphics.clear();
			
