public function barState($stateData = null) {
		$result = '';
		if (!is_array($stateData)) {
			$stateData = [];
		}

		if (empty($stateData)) {
			$stateData = [
				[
					'stateName' => $this->showEmpty(null),
					'stateId' => null,
					'amount' => 0,
					'stateUrl' => null,
				]
			];
		}

		$totalAmount = Hash::apply($stateData, '{n}.amount', 'array_sum');
		$percSum = 0;
		$countState = count($stateData);
		foreach ($stateData as $i => $stateItem) {
			$class = 'progress-bar';
			if (isset($stateItem['class']) && !empty($stateItem['class'])) {
				$class .= ' ' . $stateItem['class'];
			}
			if ($totalAmount > 0) {
				$perc = round($stateItem['amount'] / $totalAmount * 100, 2);
			} else {
				$perc = 100;
			}
			$percRound = round($perc);
			if ($percSum + $percRound > 100) {
				$percRound = 100 - $percSum;
			} else {
				if ($i == $countState - 1) {
					$percRound = 100 - $percSum;
				}
			}
			$percSum += $percRound;
			$stateName = $stateItem['stateName'];
			$progressBar = $this->Html->div(
				$class,
				$stateName,
				['role' => 'progressbar', 'style' => 'width:' . $percRound . '%',
					'title' => $stateName . ': ' . $this->Number->format(
						$stateItem['amount'],
						['thousands' => ' ', 'before' => '', 'places' => 0]
					) . ' (' . $perc . '%)',
					'data-toggle' => 'tooltip']
			);

			if (isset($stateItem['stateUrl']) && !empty($stateItem['stateUrl'])) {
				$progressBar = $this->Html->link(
					$progressBar,
					$stateItem['stateUrl'],
					['target' => '_blank', 'escape' => false]
				);
			}
			$result .= $progressBar;
		}
		$result = $this->Html->div('progress', $result);

		return $result;
	}