Back to Devexpress

DxChartTooltip.ChildContent Property

blazor-devexpress-dot-blazor-dot-dxcharttooltip-99b4ca71.md

latest2.1 KB
Original Source

DxChartTooltip.ChildContent Property

Specifies Tooltip content.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public RenderFragment<ChartTooltipData> ChildContent { get; set; }

Property Value

TypeDescription
RenderFragment<ChartTooltipData>

Content markup.

|

Remarks

The ChildContent component parameter can store custom component content that does not belong to other component’s RenderFragment properties as shown below:

razor
<DxChart Data="@SalesData">
    <DxChartTooltip Enabled="true" Position="RelativePosition.Outside">
        <ChildContent>
            <div class="m-3">
                <div class="font-weight-bold">@context.Point.SeriesName</div>
                <div>City: @context.Point.Argument</div>
               <div>Amount: @context.Point.Value</div>
            </div>
        </ChildContent>
    </DxChartTooltip>
    @* ... *@
</DxChart>

Note

Since ChildContent contains nested markup of its parent class, the template content must conform to HTML semantics.

You can omit the <ChildContent> tag and specify the markup directly in the <DxChartTooltip> tag:

razor
<DxChart Data="@SalesData">
    <DxChartTooltip Enabled="true" Position="RelativePosition.Outside">
        <div class="m-3">
            <div class="font-weight-bold">@context.Point.SeriesName</div>
            <div>City: @context.Point.Argument</div>
            <div>Amount: @context.Point.Value</div>
        </div>
    </DxChartTooltip>
    @* ... *@
</DxChart>

See Also

DxChartTooltip Class

DxChartTooltip Members

DevExpress.Blazor Namespace