/**
* Called within the view to display the timeline itself.
*/
protected function renderTimeline(array
$collectors, float
$startTime, int
$segmentCount, int
$segmentDuration, array &
$styles): string
{ $rows =
$this->
collectTimelineData($collectors);
$styleCount = 0;
// Use recursive render function
return $this->
renderTimelineRecursive($rows,
$startTime,
$segmentCount,
$segmentDuration,
$styles,
$styleCount);
} /**
* Recursively renders timeline elements and their children.
*/
protected function renderTimelineRecursive(array
$rows, float
$startTime, int
$segmentCount, int
$segmentDuration, array &
$styles, int &
$styleCount, int
$level = 0, bool
$isChild = false
): string
{ $displayTime =
$segmentCount *
$segmentDuration;
$output = '';