Back to Devexpress

ChartTooltipData.Series Property

blazor-devexpress-dot-blazor-dot-charttooltipdata-fe3fb7f7.md

latest1.5 KB
Original Source

ChartTooltipData.Series Property

Returns a series used to compose the tooltip text.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public IChartSeriesBase Series { get; }

Property Value

TypeDescription
IChartSeriesBase

A series that a user hovers over with the mouse cursor.

|

Remarks

The following example specifies tooltip content:

razor
<DxChartTooltip Enabled="true">
    <div class="tooltip-margin">
        @if (context.Series.Name == GeneratedDataSeriesName) {
            <div class="fw-bold">
                @string.Format("[{0:0.#} - {1:0.#})", (double)context.Point.Argument - Interval * 0.5, (double)context.Point.Argument + Interval * 0.5)
            </div>
            <div>@context.Point.Value @((int)context.Point.Value == 1 ? "point" : "points")</div>
        }
        else {
            <div>@string.Format("{0:0.###}", (double)context.Point.Value)</div>
        }
    </div>
</DxChartTooltip>
css
.tooltip-margin {
    margin: 0.75rem
}

See Also

ChartTooltipData Class

ChartTooltipData Members

DevExpress.Blazor Namespace