alexa
menu

Blazor Toolkit

    Show / Hide Table of Contents

    Class ChartAxisCrosshairTooltip

    Provides options to customize the axis crosshair tooltip.

    Inheritance
    System.Object
    SfBaseComponent
    ChartSubComponent
    ChartAxisCrosshairTooltip
    Implements
    System.IAsyncDisposable
    Inherited Members
    SfBaseComponent.DisposeAsync()
    Namespace: Syncfusion.Blazor.Toolkit.Charts
    Assembly: Syncfusion.Blazor.Toolkit.dll
    Syntax
    public class ChartAxisCrosshairTooltip : ChartSubComponent, IAsyncDisposable, ISubcomponentTracker
    Remarks

    Use this component inside an axis (e.g., ChartPrimaryXAxis) to enable and style the axis-specific crosshair tooltip. The tooltip is shown when crosshair is enabled on the chart.

    Examples
    // This example demonstrates enabling crosshair and displaying a tooltip for the X-axis in a Chart.
    <SfChart>
        <ChartPrimaryXAxis>
            <ChartAxisCrosshairTooltip Enable="true"></ChartAxisCrosshairTooltip>
        </ChartPrimaryXAxis>
        <ChartCrosshairSettings Enable="true" />
        <ChartSeries DataSource="@Data" XName="XValue" YName="YValue">
        </ChartSeries>
    </SfChart>

    Constructors

    ChartAxisCrosshairTooltip()

    Declaration
    public ChartAxisCrosshairTooltip()

    Properties

    Enable

    Gets or sets a value indicating whether the axis crosshair tooltip is enabled.

    Declaration
    public bool Enable { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if enabled; otherwise, false. Default is false.

    Remarks

    Set this to true to show an axis-aligned tooltip when the chart crosshair is active.

    Fill

    Gets or sets the fill color of the tooltip background.

    Declaration
    public string Fill { get; set; }
    Property Value
    Type Description
    System.String

    A CSS color string (hex, rgba, or named). The default is theme-dependent.

    Remarks

    Accepts any valid CSS color (e.g., #ff0000, rgba(255,0,0,0.5)).

    Examples
    <ChartPrimaryXAxis>
        <ChartAxisCrosshairTooltip Enable="true" Fill="red"></ChartAxisCrosshairTooltip>
    </ChartPrimaryXAxis>

    TextStyle

    Gets or sets an instance of ChartCrosshairTextStyle that customizes the text style of the axis crosshair tooltip.

    Declaration
    public ChartCrosshairTextStyle TextStyle { get; set; }
    Property Value
    Type Description
    ChartCrosshairTextStyle

    An instance of ChartCrosshairTextStyle.

    Remarks

    Configure text color, size, weight, and family for the axis crosshair tooltip.

    Examples
    <ChartPrimaryXAxis>
        <ChartAxisCrosshairTooltip Enable="true">
            <ChartCrosshairTextStyle Color="blue" Size="15px" />
        </ChartAxisCrosshairTooltip>
    </ChartPrimaryXAxis>

    Implements

    System.IAsyncDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved