Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxPolarChart<T>.ShowTooltip(T, Int32) Method

Shows the tooltip for the specified series point.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public void ShowTooltip(
    T point,
    int seriesIndex
)

#Parameters

Name Type Description
point T

The series point for which the tooltip is shown.

seriesIndex Int32

The series order in chart markup.

#Remarks

Add a DxChartTooltip object to chart markup and set the DxChartTooltip.Enabled property to true to enable tooltip functionality.

DxPolarChart allows you to change tooltip visibility in code. Call ShowTooltip method overloads to show the tooltip for the specified series point. To hide the tooltip, call the HideTooltip() method.

When you call ShowTooltip method overloads, DxPolarChart raises the TooltipShowing event. In the event handler, you can get information about the tooltip and specify whether it should appear.

The following code snippet displays custom Show Tooltip and Hide Tooltip buttons that show and hide the tooltip for the specified series point:

<DxPolarChart Data=@DataSource @ref="@polarChart">
    <DxPolarChartBarSeries Name="Day"
                           Color="Color.Sienna"
                           ArgumentField="@((DiscretePoint i) => i.Arg)"
                           ValueField="@((DiscretePoint i) => i.Day)" />
    <DxPolarChartBarSeries Name="Night"
                           Color="Color.MidnightBlue"
                           ArgumentField="@((DiscretePoint i) => i.Arg)"
                           ValueField="@((DiscretePoint i) => i.Night)" />
    <DxPolarChartValueAxis ValueType="ChartAxisDataType.Numeric" />
    <DxChartTooltip Enabled="true" />
    <DxChartLegend Position="RelativePosition.Outside" />
</DxPolarChart>

<DxButton Text=" Show Tooltip" Click="@OnShowTooltipButtonClick" />
<DxButton Text = "Hide Tooltip" Click="@OnHideTooltipButtonClick" />

@code {
    DxPolarChart<DiscretePoint> polarChart;
    string seriesName = "Night";

    void OnShowTooltipButtonClick() {
        var point = DataSource.Where(i => i.Arg == "June").FirstOrDefault();
        if(point != null)
            // Pass the series name as a parameter
            polarChart.ShowTooltip(point, seriesName);
            // Pass the series index (order) as a parameter
            polarChart.ShowTooltip(point, 1);
    }

    void OnHideTooltipButtonClick() {
        polarChart.HideTooltip();
    }
}
See Also