Class ChartTooltip

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class ChartTooltip extends JComponent
A simple, theme-aware tooltip component for charts. It now accepts a pre-formatted string.
Since:
2026-01-01
Version:
1.0.0
Author:
Arber Gashi
See Also:
  • Constructor Details

    • ChartTooltip

      public ChartTooltip()
      Creates a theme-aware tooltip component.
  • Method Details

    • setText

      public void setText(String text)
      Sets the text to be displayed in the tooltip. The text can contain HTML for multi-line formatting.
      Parameters:
      text - The tooltip text.
    • updateUI

      public void updateUI()
      Overrides:
      updateUI in class JComponent
    • setTheme

      public void setTheme(ChartTheme theme)
      Sets the theme for tooltip background and text colors.
      Parameters:
      theme - chart theme to apply; falls back to a default when null