# XY Chart - Tooltip width problem

**URL:** <https://forum.inductiveautomation.com/t/xy-chart-tooltip-width-problem/105909>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 6, 2025, 12:17pm UTC](https://forum.inductiveautomation.com/t/xy-chart-tooltip-width-problem/105909 "2025-05-06T12:17:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [May 6, 2025, 12:17pm UTC](https://forum.inductiveautomation.com/t/xy-chart-tooltip-width-problem/105909/1 "2025-05-06T12:17:53Z")

</div>

Hello everybody,

I'm wondering if it's possible to set a maximum width for XY Chart tooltips in Perspective.

My problem is that the tooltip contains a `Description` string that can sometimes be quite long. When this happens, the tooltip extends off-screen because the text isn't wrapping.

Any advice on how to achieve this would be appreciated!

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 6, 2025, 1:10pm UTC](https://forum.inductiveautomation.com/t/xy-chart-tooltip-width-problem/105909/2 "2025-05-06T13:10:27Z")

</div>

![Tooltip maxWidth](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/7/47be914549d8dddd1fafbbc761557545e107e9aa.png)

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [May 6, 2025, 1:43pm UTC](https://forum.inductiveautomation.com/t/xy-chart-tooltip-width-problem/105909/3 "2025-05-06T13:43:16Z")

</div>

@Transistor, thanks for the reply.

I guess I explain bad, I need to manage the tooltip in the XY chart series, not in the META.

In ant case I try to add the style object in the tooltip properties, but is not working.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/4/14ed06ba61a2de85741da29d8accd52b5a68f197.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 6, 2025, 3:15pm UTC](https://forum.inductiveautomation.com/t/xy-chart-tooltip-width-problem/105909/4 "2025-05-06T15:15:16Z")

</div>

The [Tooltips – amCharts 4 Documentation](https://www.amcharts.com/docs/v4/concepts/tooltips/#Tooltip_contents) says that tooltips support `maxWidth` but it looks like the property is not exposed in Ignition's implementation.

Sorry, I don't know how to force or inject something to fix that.

You could script it. Try this in Script Console.

```python
import textwrap
strs = "Look all around, there's nothing but blue skies - Look straight ahead, there's nothing but blue skies."
print(textwrap.fill(strs, 20))

```

This will be a bit iffy with proportional width fonts as some words might get shunted onto the next line even though there's enough room.

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [May 7, 2025, 5:27am UTC](https://forum.inductiveautomation.com/t/xy-chart-tooltip-width-problem/105909/5 "2025-05-07T05:27:53Z")

</div>

Thanks for your reply, your code in the script console is working good.

This is the print

```python
>>> 
Look all around,
there's nothing but
blue skies - Look
straight ahead,
there's nothing but
blue skies.
>>> 

```

I manage my `Description` field in the way you suggest and it is working very good, this is a good workaround for the moment.

Thanks a lot for your help
