docs: function (wrapper) {
  		var textNode = wrapper.element,
  			lines = pick(wrapper.textStr, '').toString()
  				.replace(/<(b|strong)>/g, '<span style="font-weight:bold">')
  				.replace(/<(i|em)>/g, '<span style="font-style:italic">')
  				.replace(/<a/g, '<span')
  				.replace(/<\/(b|strong|i|em|a)>/g, '</span>')
  				.split(/<br.*?>/g),
  			childNodes = textNode.childNodes,
  			styleRegex = /style="([^"]+)"/,
  			hrefRegex = /href="([^"]+)"/,
  			parentX = attr(textNode, 'x'),
  			textStyles = wrapper.styles,
  			renderAsHtml = textStyles && wrapper.useHTML && !this.forExport,
  			htmlNode = wrapper.htmlNode,
  			//arr, issue #38 workaround
  			width = textStyles && pInt(textStyles.width),
  			textLineHeight = textStyles && textStyles.lineHeight,
  			lastLine,
  			GET_COMPUTED_STYLE = 'getComputedStyle',
  			i = childNodes.length;
  
  		// remove old text
  		while (i--) {
  			textNode.removeChild(childNodes[i]);
  		}
  
  		if (width && !wrapper.added) {
  			this.box.appendChild(textNode); // attach it to the DOM to read offset width
  		}
  
  		each(lines, function (line, lineNo) {
  			var spans, spanNo = 0, lineHeight;
  
  			line = line.replace(/<span/g, '|||<span').replace(/<\/span>/g, '</span>|||');
  			spans = line.split('|||');
  
  			each(spans, function (span) {
  				if (span !== '' || spans.length === 1) {
  					var attributes = {},
  						tspan = doc.createElementNS(SVG_NS, 'tspan');
  					if (styleRegex.test(span)) {
  						attr(
  							tspan,
  							'style',
  							span.match(styleRegex)[1].replace(/(;| |^)color([ :])/, '$1fill$2')
  						);
  					}
  					if (hrefRegex.test(span)) {
  						attr(tspan, 'onclick', 'location.href=\"' + span.match(hrefRegex)[1] + '\"');
  						css(tspan, { cursor: 'pointer' });
  					}
  
  					span = (span.replace(/<(.|\n)*?>/g, '') || ' ')
  						.replace(/&lt;/g, '<')
  						.replace(/&gt;/g, '>');
  
  					// issue #38 workaround.
  					/*if (reverse) {
  						arr = [];
  						i = span.length;
  						while (i--) {
  							arr.push(span.charAt(i));
  						}
  						span = arr.join('');
  					}*/
  
  					// add the text node
  					tspan.appendChild(doc.createTextNode(span));
  
  					if (!spanNo) { // first span in a line, align it to the left
  						attributes.x = parentX;
  					} else {
  						// Firefox ignores spaces at the front or end of the tspan
  						attributes.dx = 3; // space
  					}
  
  					// first span on subsequent line, add the line height
  					if (!spanNo) {
  						if (lineNo) {
  
  							// allow getting the right offset height in exporting in IE
  							if (!hasSVG && wrapper.renderer.forExport) {
  								css(tspan, { display: 'block' });
  							}
  
  							// Webkit and opera sometimes return 'normal' as the line height. In that
  							// case, webkit uses offsetHeight, while Opera falls back to 18
  							lineHeight = win[GET_COMPUTED_STYLE] &&
  								pInt(win[GET_COMPUTED_STYLE](lastLine, null).getPropertyValue('line-height'));
  
  							if (!lineHeight || isNaN(lineHeight)) {
  								lineHeight = textLineHeight || lastLine.offsetHeight || 18;
  							}
  							attr(tspan, 'dy', lineHeight);
  						}
  						lastLine = tspan; // record for use in next line
  					}
  
  					// add attributes
  					attr(tspan, attributes);
  
  					// append it
  					textNode.appendChild(tspan);
  
  					spanNo++;
  
  					// check width and apply soft breaks
  					
  					// PATCH by Simon Fishel
                      // - if (width) {
                      // + if (false && width) {
                      // disabling soft breaks because we are coercing our time-based
                      // axes to categories where we only label a subset of the ticks
  					
  					if (false && width) {
  						var words = span.replace(/-/g, '- ').split(' '),
  							tooLong,
  							actualWidth,
  							rest = [];
  
  						while (words.length || rest.length) {
  							actualWidth = textNode.getBBox().width;
  							tooLong = actualWidth > width;
  							if (!tooLong || words.length === 1) { // new line needed
  								words = rest;
  								rest = [];
  								if (words.length) {
  									tspan = doc.createElementNS(SVG_NS, 'tspan');
  									attr(tspan, {
  										dy: textLineHeight || 16,
  										x: parentX
  									});
  									textNode.appendChild(tspan);
  
  									if (actualWidth > width) { // a single word is pressing it out
  										width = actualWidth;
  									}
  								}
  							} else { // append to existing line tspan
  								tspan.removeChild(tspan.firstChild);
  								rest.unshift(words.pop());
  							}
  							if (words.length) {
  								tspan.appendChild(doc.createTextNode(words.join(' ').replace(/- /g, '-')));
  							}
  						}
  					}
  				}
  			});
  		});
  
  		// Fix issue #38 and allow HTML in tooltips and other labels
  		if (renderAsHtml) {
  			if (!htmlNode) {
  				htmlNode = wrapper.htmlNode = createElement('span', null, extend(textStyles, {
  					position: ABSOLUTE,
  					top: 0,
  					left: 0
  				}), this.box.parentNode);
  			}
  			htmlNode.innerHTML = wrapper.textStr;
  
  			i = childNodes.length;
  			while (i--) {
  				childNodes[i].style.visibility = HIDDEN;
  			}
  		}
  	}