Refactored duplicate select in getTooltipContent().