tooltip = $tooltip; return $this; } /** * Get the tooltip text * * @return string|null */ public function get_tooltip(): ?string { return $this->tooltip; } /** * Build chart tooltip text * * @param string $title Chart title * @param string $description Chart description * @param array $bullets List of bullet points * @return string Formatted tooltip HTML */ protected function build_chart_tooltip( string $title, string $description, array $bullets ): string { $html = '' . esc_html( $title ) . '
'; $html .= esc_html( $description ); if ( ! empty( $bullets ) ) { $html .= ''; } return $html; } /** * Build standard tooltip text * * @param string $text Tooltip text * @return string Formatted tooltip HTML */ protected function build_tooltip( string $text ): string { return esc_html( $text ); } }