docs: function renderItem(item) {
  			var bBox,
  				itemWidth,
  				legendSymbol,
  				symbolX,
  				symbolY,
  				simpleSymbol,
  				li = item.legendItem,
  				series = item.series || item,
  				itemOptions = series.options,
  				strokeWidth = (itemOptions && itemOptions.borderWidth) || 0;
  
  			if (!li) { // generate it once, later move it
  
  				// let these series types use a simple symbol
  				simpleSymbol = /^(bar|pie|area|column)$/.test(series.type);
  
  				// generate the list item text
  				item.legendItem = li = renderer.text(
  						options.labelFormatter.call(item),
  						0,
  						0
  					)
  					.css(item.visible ? itemStyle : itemHiddenStyle)
  					.on('mouseover', function () {
  						item.setState(HOVER_STATE);
  						li.css(itemHoverStyle);
  					})
  					.on('mouseout', function () {
  						li.css(item.visible ? itemStyle : itemHiddenStyle);
  						item.setState();
  					})
  					
  					// PATCH by Simon Fishel
  					// 
  					// see below
  					// 
  					// - .on('click', function () {
  					// + .on('click', function (event) {
  					
  					.on('click', function (event) {
  						var strLegendItemClick = 'legendItemClick',
  							fnLegendItemClick = function () {
  								item.setVisible();
  							};
  						
  						// PATCH by Simon Fishel
  						//
  						// passing any control/command key modifiers to the event handler
  						//
  						// + var eventArgs = {
                          // +     ctrlKey: event.ctrlKey,
                          // +     metaKey: event.metaKey
                          // + };
  						//
  						//   // click the name or symbol
  	                    //   if (item.firePointEvent) { // point
  						// -     item.firePointEvent(strLegendItemClick, null, fnLegendItemClick);
  	                    // +     item.firePointEvent(strLegendItemClick, eventArgs, fnLegendItemClick);
  	                    //   } else {
  						// -     fireEvent(item, strLegendItemClick, null, fnLegendItemClick);
  	                    // +     fireEvent(item, strLegendItemClick, eventArgs, fnLegendItemClick);
  	                    //   }
  							
  						var eventArgs = {
  						    ctrlKey: event.ctrlKey,
  						    metaKey: event.metaKey
  						};
  
  						// click the name or symbol
  						if (item.firePointEvent) { // point
  							item.firePointEvent(strLegendItemClick, eventArgs, fnLegendItemClick);
  						} else {
  							fireEvent(item, strLegendItemClick, eventArgs, fnLegendItemClick);
  						}
  					})
  					.attr({ zIndex: 2 })
  					.add(legendGroup);
  
  				// draw the line
  				if (!simpleSymbol && itemOptions && itemOptions.lineWidth) {
  					var attrs = {
  							'stroke-width': itemOptions.lineWidth,
  							zIndex: 2
  						};
  					if (itemOptions.dashStyle) {
  						attrs.dashstyle = itemOptions.dashStyle;
  					}
  					item.legendLine = renderer.path([
  						M,
  						-symbolWidth - symbolPadding,
  						0,
  						L,
  						-symbolPadding,
  						0
  					])
  					.attr(attrs)
  					.add(legendGroup);
  				}
  
  				// draw a simple symbol
  				if (simpleSymbol) { // bar|pie|area|column
  
  					legendSymbol = renderer.rect(
  						(symbolX = -symbolWidth - symbolPadding),
  						(symbolY = -11),
  						symbolWidth,
  						12,
  						2
  					).attr({
  						//'stroke-width': 0,
  						zIndex: 3
  					}).add(legendGroup);
  
  				// draw the marker
  				} else if (itemOptions && itemOptions.marker && itemOptions.marker.enabled) {
  					legendSymbol = renderer.symbol(
  						item.symbol,
  						(symbolX = -symbolWidth / 2 - symbolPadding),
  						(symbolY = -4),
  						itemOptions.marker.radius
  					)
  					//.attr(item.pointAttr[NORMAL_STATE])
  					.attr({ zIndex: 3 })
  					.add(legendGroup);
  
  				}
  				if (legendSymbol) {
  					legendSymbol.xOff = symbolX + (strokeWidth % 2 / 2);
  					legendSymbol.yOff = symbolY + (strokeWidth % 2 / 2);
  				}
  
  				item.legendSymbol = legendSymbol;
  
  				// colorize the items
  				colorizeItem(item, item.visible);
  
  
  				// add the HTML checkbox on top
  				if (itemOptions && itemOptions.showCheckbox) {
  					item.checkbox = createElement('input', {
  						type: 'checkbox',
  						checked: item.selected,
  						defaultChecked: item.selected // required by IE7
  					}, options.itemCheckboxStyle, container);
  
  					addEvent(item.checkbox, 'click', function (event) {
  						var target = event.target;
  						fireEvent(item, 'checkboxClick', {
  								checked: target.checked
  							},
  							function () {
  								item.select();
  							}
  						);
  					});
  				}
  			}
  
  
  			// calculate the positions for the next line
  			bBox = li.getBBox();
  
  			itemWidth = item.legendItemWidth =
  				options.itemWidth || symbolWidth + symbolPadding + bBox.width + padding;
  			itemHeight = bBox.height;
  
  			// if the item exceeds the width, start a new line
  			if (horizontal && itemX - initialItemX + itemWidth >
  					(widthOption || (chartWidth - 2 * padding - initialItemX))) {
  				itemX = initialItemX;
  				itemY += itemHeight;
  			}
  			lastItemY = itemY;
  
  			// position the newly generated or reordered items
  			positionItem(item, itemX, itemY);
  
  			// advance
  			if (horizontal) {
  				itemX += itemWidth;
  			} else {
  				itemY += itemHeight;
  			}
  
  			// the width of the widest item
  			offsetWidth = widthOption || mathMax(
  				horizontal ? itemX - initialItemX : itemWidth,
  				offsetWidth
  			);
  
  
  
  			// add it all to an array to use below
  			//allItems.push(item);
  		}