Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Round fractions up
<?php ceil(int|float $num): float
<?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();

        }