Class
ChartTooltip

Configures interactive tooltips that appear when users hover over chart data points. Provides contextual information, data values, and formatted details for enhanced user experience. Essential for making charts interactive and informative without cluttering the visualization. Supports custom templates, shared tooltips across series, and advanced formatting options. Use to display detailed data values, percentages, dates, and custom contextual information.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class ChartTooltip : ChartTooltipBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseDataVizChildComponentChartSeriesTooltipBaseChartTooltipBaseChartTooltip

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members ComponentBase.OnInitializedAsync()ComponentBase.OnParametersSetAsync()ComponentBase.StateHasChanged()ComponentBase.ShouldRender()ComponentBase.OnAfterRenderAsync(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)

Constructors

ChartTooltip()

Declaration

cs-api-definition
public ChartTooltip()

Properties

AutoHide

Controls whether the chart tooltip automatically hides when the mouse leaves the target chart element. When set to true, the tooltip disappears automatically on mouse leave. When false, a close button is displayed within the tooltip for manual dismissal. Use this to control tooltip behavior based on user interaction preferences and chart complexity. Example: Set to false for complex tooltips with interactive content that users may need time to read or interact with.

Declaration

cs-api-definition
[Parameter]
public bool? AutoHide { get; set; }

Property Value

bool?

Background

Sets the background color of the chart tooltip container. Accepts any valid CSS color value including hex codes (#f8f9fa), RGB values (rgb(248,249,250)), or color names (lightgray). Use this to match tooltip styling with your application theme and ensure proper contrast for tooltip content readability. Example: Set to "rgba(255,255,255,0.95)" for a semi-transparent white background that doesn't completely obscure chart data.

Declaration

cs-api-definition
[Parameter]
public string Background { get; set; }

Property Value

string

ChildContent

Declaration

cs-api-definition
[Parameter]
public RenderFragment ChildContent { get; set; }

Property Value

RenderFragment

Color

Sets the text color for all content within the chart tooltip. Accepts any valid CSS color value including hex codes (#333333), RGB values (rgb(51,51,51)), or color names (black). Use this to ensure tooltip text has appropriate contrast against the background and maintains readability across different themes. Example: Set to "#ffffff" when using dark tooltip backgrounds, or "#2c3e50" for professional dark text on light backgrounds.

Declaration

cs-api-definition
[Parameter]
public string Color { get; set; }

Property Value

string

Font

Sets the font properties for tooltip text using CSS font syntax. Accepts standard CSS font shorthand notation including font-weight, font-size, and font-family specifications. Use this to ensure tooltip typography matches your application's design system and maintains consistency with other UI elements. Example: Set to "12px Arial" for compact tooltips, or "bold 14px 'Segoe UI'" for more prominent tooltip displays.

Declaration

cs-api-definition
[Parameter]
public string Font { get; set; }

Property Value

string

Opacity

Sets the transparency level of the entire tooltip container. Accepts values between 0 (completely transparent) and 1 (completely opaque) to control tooltip visibility. Use this to create subtle tooltip presentations that don't completely obscure underlying chart data while maintaining readability. Example: Set to 0.9 for slightly transparent tooltips, or 0.8 for more transparency when overlaying dense chart areas.

Declaration

cs-api-definition
[Parameter]
public double? Opacity { get; set; }

Property Value

double?

Visible

Controls whether tooltips are displayed when users hover over chart elements. When set to true, tooltips appear on hover to show additional data context. When false, no tooltips are shown. Use this to enable or disable the tooltip feature based on chart complexity, user preferences, or display requirements. Example: Set to true for data-rich charts where users need detailed hover information, or false for simple charts where tooltips might be distracting.

Declaration

cs-api-definition
[Parameter]
public bool? Visible { get; set; }

Property Value

bool?

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnAfterRender(bool)

Declaration

cs-api-definition
protected override void OnAfterRender(bool firstRender)

Parameters

firstRender

bool

Overrides ComponentBase.OnAfterRender(bool)

OnInitialized()

Declaration

cs-api-definition
protected override void OnInitialized()

Overrides DataVizChildComponent.OnInitialized()

OnParametersSet()

Declaration

cs-api-definition
protected override void OnParametersSet()

Overrides ComponentBase.OnParametersSet()

Serialize()

Declaration

cs-api-definition
public Dictionary<string, object> Serialize()

Returns

Dictionary<string, object>