public function bar($value, $offset, $options = [])
{
$settings = array_merge($this->_defaultSettings, $options);
/* @var int $max */
/* @var int $width */
/* @var string $valueType */
extract($settings);
$graphValue = $value / $max * $width;
$graphValue = max(round($graphValue), 1);
if ($valueType === 'percentage') {
$graphOffset = 0;
} else {
$graphOffset = $offset / $max * $width;
$graphOffset = round($graphOffset);
}
return sprintf('<div class="graph-bar" style="%s"><div class="graph-bar-value" style="%s" title="%s"> </div></div>', "width: {$width}px", "margin-left: {$graphOffset}px; width: {$graphValue}px", __d('debug_kit', "Starting {0}ms into the request, taking {1}ms", $offset, $value));
}