<?php }
foreach ($this->sparkData as $number) {
$tickIndex = ceil(($number / $max) * count($this->sparkTicks)) - 1;
if ($max === 0 || $tickIndex < 0) $tickIndex = 0;
$result .= span($this->sparkTicks[$tickIndex])->color($this->getStyles()['color'] . (($tickIndex == 0) ? 100 : $tickIndex * 100))->renderToString();
}