# Line chart tooltip overlap

**URL:** <https://forum.radzen.com/t/line-chart-tooltip-overlap/6024>\
**Category:** Radzen.Blazor Components\
**Created:** [December 15, 2020, 11:13am UTC](https://forum.radzen.com/t/line-chart-tooltip-overlap/6024 "2020-12-15T11:13:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ipe](https://forum.radzen.com/letter_avatar_proxy/v4/letter/i/7bcc69/32.png) [@ipe](https://forum.radzen.com/u/ipe)\
**Post date:** [December 15, 2020, 11:13am UTC](https://forum.radzen.com/t/line-chart-tooltip-overlap/6024/1 "2020-12-15T11:13:35Z")

</div>

There is overlap in the line chart tooltip text when all of the following apply:

- The text is long
- There are two bootstrap columns in the tooltip
- The tooltip is close to the right edge of the screen

It appears that the maximum width of the tooltip is limited when near the right edge of the screen, and this causes the problem.

Please see the screenshots below for an example of the overlap and what it normally looks like.

 ![image](https://forum.radzen.com/uploads/default/original/2X/1/11c00d73e022835a84e0973b1cee3c541ed41b59.png)

 ![image](https://forum.radzen.com/uploads/default/original/2X/f/f55d0f5478ff8178d002ee87d6e8657026875033.png)

---

<div class="post-metadata">

**Author:** ![ipe](https://forum.radzen.com/letter_avatar_proxy/v4/letter/i/7bcc69/32.png) [@ipe](https://forum.radzen.com/u/ipe)\
**Post date:** [December 15, 2020, 11:18am UTC](https://forum.radzen.com/t/line-chart-tooltip-overlap/6024/2 "2020-12-15T11:18:53Z")

</div>

The tooltip template I use is as follows:

```
<TooltipTemplate Context="data">
    <div class="row">
        <div class="col-6"><strong>@data.Graph.Tag</strong></div>
        <div class="col-6 text-right"><strong>@data.Value.ToString("F3")</strong></div>
    </div>
    <div class="row">
        <div class="col"><i>@data.Timestamp.ToString("yyyy-MM-dd HH:mm:ss.fff")</i></div>
    </div>
</TooltipTemplate>
```

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [December 15, 2020, 12:02pm UTC](https://forum.radzen.com/t/line-chart-tooltip-overlap/6024/3 "2020-12-15T12:02:07Z")

</div>

This is how Bootstrap rows and cols behave - they occupy the available space. You can try setting some minimal width to a parent element within the tooltip template.

```auto
<TooltipTemplate Context="data">
    <div style="width: 400px">
    <div class="row">
        <div class="col-6"><strong>@data.Graph.Tag</strong></div>
        <div class="col-6 text-right"><strong>@data.Value.ToString("F3")</strong></div>
    </div>
    <div class="row">
        <div class="col"><i>@data.Timestamp.ToString("yyyy-MM-dd HH:mm:ss.fff")</i></div>
    </div>
   </div>
</TooltipTemplate>

```

---

<div class="post-metadata">

**Author:** ![ipe](https://forum.radzen.com/letter_avatar_proxy/v4/letter/i/7bcc69/32.png) [@ipe](https://forum.radzen.com/u/ipe)\
**Post date:** [December 15, 2020, 12:21pm UTC](https://forum.radzen.com/t/line-chart-tooltip-overlap/6024/4 "2020-12-15T12:21:41Z")

</div>

Yes, correct, that works. Thanks once again!
