 				graphics.drawRect(tempBounds.getXMin(), tempBounds.getYMin(), tempBounds.getWidth(), tempBounds.getHeight());
 				graphics.endFill();
 				// flush the tempShape "buffer" onto the destination BitmapData.
-				destination.draw(tempShape);
-			}
-			
-			//---------------------------------------------------------
-			// END template code
+				task.buffer.draw(tempShape);
+				
+				// draw value label
+				if (showValueLabels.value)
+				{
+					if (agCol)
+						_bitmapText.text = ColumnUtils.deriveStringFromNumber(agCol, binHeight);
+					else
+						_bitmapText.text = StandardLib.formatNumber(binHeight);
+					if (horizontalMode.value)
+					{
+						_bitmapText.x = tempBounds.getXMax();
+						_bitmapText.y = tempBounds.getYCenter();
+						_bitmapText.angle = 0;
+					}
+					else
+					{
+						_bitmapText.x = tempBounds.getXCenter();
+						_bitmapText.y = tempBounds.getYMax();
+						_bitmapText.angle = 270;
+					}
+					
+					_bitmapText.maxWidth = valueLabelMaxWidth.value;
+					_bitmapText.verticalAlign = valueLabelVerticalAlign.value;
+					_bitmapText.horizontalAlign = valueLabelHorizontalAlign.value;
+					
+					if (isFinite(valueLabelRelativeAngle.value))
+						_bitmapText.angle += valueLabelRelativeAngle.value;
+					
+					_bitmapText.textFormat.color = valueLabelColor.value;
+					
+					TextGlyphPlotter.drawInvisibleHalo(_bitmapText, task);
+					_bitmapText.draw(task.buffer);
+				}
+			}
+			
+			return 1;
 		}
 		
 		private const tempBounds:IBounds2D = new Bounds2D(); // reusable temporary object

		public const drawPartialBins:LinkableBoolean = registerLinkableChild(this, new LinkableBoolean(true));
		public const columnToAggregate:DynamicColumn = newSpatialProperty(DynamicColumn);
		public const aggregationMethod:LinkableString = registerSpatialProperty(new LinkableString(AG_COUNT, verifyAggregationMethod));
		public const horizontalMode:LinkableBoolean = registerSpatialProperty(new LinkableBoolean(false));
		
		private static function verifyAggregationMethod(value:String):Boolean { return ENUM_AGGREGATION_METHODS.indexOf(value) >= 0; }
		public static const ENUM_AGGREGATION_METHODS:Array = [AG_COUNT, AG_SUM, AG_MEAN];

	import weave.api.setSessionState;
	import weave.api.ui.IPlotTask;
	import weave.api.ui.ISelectableAttributes;
	import weave.compiler.StandardLib;
	import weave.core.LinkableBoolean;
	import weave.core.LinkableNumber;
	import weave.core.LinkableString;
	import weave.data.AttributeColumns.BinnedColumn;
	import weave.data.AttributeColumns.ColorColumn;
	import weave.data.AttributeColumns.DynamicColumn;
	import weave.data.AttributeColumns.FilteredColumn;
	import weave.primitives.Bounds2D;
	import weave.utils.BitmapText;
	import weave.utils.ColumnUtils;
	import weave.utils.LinkableTextFormat;
	import weave.visualization.plotters.styles.SolidFillStyle;
	import weave.visualization.plotters.styles.SolidLineStyle;
	
