protected function renderBar( $ratio, $length = 100 )
	{
		$css			= array();
//		$width			= floor( $ratio * $length );
		$width			= max( 0, min( 100, $ratio * 100 ) );
		$css['width']	= $width.'%';
		if( $this->getOption( 'useColor' ) )
		{
			$color	= $this->getColorFromRatio( $ratio );
			$css['background-color']	= "rgb(".$color[0].",".$color[1].",".$color[2].")";
		}

		$attributes	= array(
			'class'	=> $this->getOption( 'classInner' ),
			'style'	=> $css,
		);
		$bar		= UI_HTML_Tag::create( 'div', "", $attributes );

		$attributes	= array( 'class' => $this->getOption( 'classOuter' ) );
		$css		= array();
		if( $length !== 100 )
			$css['width']	= preg_match( "/%$/", $length ) ? $length : $length.'px';
		if( $this->getOption( 'useColor' ) && $this->getOption( 'useColorAtBorder' ) )
			$css['border-color']	= "rgb(".$color[0].",".$color[1].",".$color[2].")";
		$attributes['style']	= $css;
		return UI_HTML_Tag::create( "span", $bar, $attributes );
	}