alexa
menu

Blazor Toolkit

    Show / Hide Table of Contents

    Class ChartCrosshairTextStyle

    Provides options to customize the tooltip text style of the crosshair tooltip.

    Inheritance
    System.Object
    SfBaseComponent
    ChartSubComponent
    ChartDefaultFont
    ChartCrosshairTextStyle
    Implements
    System.IAsyncDisposable
    Inherited Members
    ChartDefaultFont.FontStyle
    ChartDefaultFont.Opacity
    ChartDefaultFont.TextAlignment
    ChartDefaultFont.TextOverflow
    SfBaseComponent.DisposeAsync()
    Namespace: Syncfusion.Blazor.Toolkit.Charts
    Assembly: Syncfusion.Blazor.Toolkit.dll
    Syntax
    public class ChartCrosshairTextStyle : ChartDefaultFont, IAsyncDisposable, ISubcomponentTracker, IChartDefaultFont

    Constructors

    ChartCrosshairTextStyle()

    Declaration
    public ChartCrosshairTextStyle()

    Properties

    Color

    Gets or sets the color for the crosshair tooltip text.

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

    A CSS color string. The default is theme-dependent. For Fluent, the default is rgba(249, 250, 251, 1).

    Overrides
    ChartDefaultFont.Color
    Remarks

    Accepts any valid CSS color (e.g., #fff, rgba(255,255,255,0.9)).

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

    FontFamily

    Gets or sets the font family for the crosshair tooltip text.

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

    A string representing the font family. The default is theme-dependent (e.g., Roboto for Fluent).

    Overrides
    ChartDefaultFont.FontFamily
    Remarks

    Use this to align with organizational typography guidelines.

    Examples
    <ChartPrimaryXAxis>
        <ChartAxisCrosshairTooltip Enable="true">
            <ChartCrosshairTextStyle FontFamily="Arial" />
        </ChartAxisCrosshairTooltip>
    </ChartPrimaryXAxis>

    FontWeight

    Gets or sets the font weight for the crosshair tooltip text.

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

    A string representing the font weight (e.g., "bold" or "400"). The default is theme-dependent (typically 400).

    Overrides
    ChartDefaultFont.FontWeight
    Remarks

    Heavier weights draw greater attention to the tooltip content.

    Examples
    <ChartPrimaryXAxis>
        <ChartAxisCrosshairTooltip Enable="true">
            <ChartCrosshairTextStyle FontWeight="bold" />
        </ChartAxisCrosshairTooltip>
    </ChartPrimaryXAxis>

    Size

    Gets or sets the font size for the crosshair tooltip text.

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

    A string representing the font size (e.g., "12px"). The default is 12px.

    Overrides
    ChartDefaultFont.Size
    Remarks

    Adjust to ensure readability on different display densities.

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

    Implements

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