# XY chart x axes to be wrapped

**URL:** <https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 19, 2024, 2:13pm UTC](https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938 "2024-02-19T14:13:03Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![vnayal](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vnayal](https://forum.inductiveautomation.com/u/vnayal)\
**Post date:** [February 19, 2024, 2:13pm UTC](https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938/1 "2024-02-19T14:13:03Z")

</div>

In Perspective, XY chart , text for x axes is not wrapping.  
Can anyone have idea?  
below photo is just sample

 ![sample](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/0/40843cf85551cffab11e7603bea3a63c7c39be0c.jpeg)

---

<div class="post-metadata">

**Author:** ![vnayal](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vnayal](https://forum.inductiveautomation.com/u/vnayal)\
**Post date:** [February 20, 2024, 12:04pm UTC](https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938/2 "2024-02-20T12:04:54Z")

</div>

awaiting for the reply

---

<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:** [February 20, 2024, 12:29pm UTC](https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938/3 "2024-02-20T12:29:29Z")

</div>

Rather than bump the post, why not make it easier for those you are asking to help. Post the JSON for the chart (formatting it properly with the \</\> button) and making sure that the sample data is included. If not (because it is provided by a binding) then post it separately.

Remember that we're mostly volunteers here with a few very helpful IA staff dropping in. If you don't get an answer then consider that the question needs to be improved.

---

<div class="post-metadata">

**Author:** ![vnayal](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vnayal](https://forum.inductiveautomation.com/u/vnayal)\
**Post date:** [February 21, 2024, 10:35am UTC](https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938/4 "2024-02-21T10:35:31Z")

</div>

In image shown with red box and comment, you can see Machine\_Fault is shown in graph and text in graph is not wrapping which will overlap all the text which is not readable .  
So I need to wrap the test for x axes.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/0/50182a3465954c7acd84473944eec89d94c185fa.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 22, 2024, 1:15pm UTC](https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938/6 "2024-02-22T13:15:09Z")

</div>

> [@vnayal](#):
>
> can you please comment now.

Dude, that is _ **so** _ inappropriate on a volunteer forum.

---

<div class="post-metadata">

**Author:** ![Matjaz\_Furlan](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Matjaz\_Furlan](https://forum.inductiveautomation.com/u/Matjaz_Furlan)\
**Post date:** [February 22, 2024, 1:20pm UTC](https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938/7 "2024-02-22T13:20:10Z")

</div>

try insert `</br>` beetween words... And yeah it is volunteer forum... easy

---

<div class="post-metadata">

**Author:** ![vnayal](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vnayal](https://forum.inductiveautomation.com/u/vnayal)\
**Post date:** [February 22, 2024, 2:37pm UTC](https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938/8 "2024-02-22T14:37:06Z")

</div>

sorry maybe you misinterpreted , I was asking in response to the change Trasnistor told me to change the question. I am not aggressively asking. It just tagged him, so that he may aware that I have changed my question.  
Instead I am thankful to @Transistor , as he mentioned to change the question.  
Once again sorry Sir it felt like I am asking in harsh way.

---

<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:** [February 23, 2024, 6:46am UTC](https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938/9 "2024-02-23T06:46:03Z")

</div>

The XY Chart component is based on AM Charts. The documentation below shows that AM Charts supports the xAxis label wrap feature you're looking for. I don't know if we can use these methods with Ignition's implementation of the XY Chart.

[https://www.amcharts.com/docs/v4/tutorials/wrapping-and-truncating-axis-labels/](https://www.amcharts.com/docs/v4/tutorials/wrapping-and-truncating-axis-labels/)

---

<div class="post-metadata">

**Author:** ![vnayal](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vnayal](https://forum.inductiveautomation.com/u/vnayal)\
**Post date:** [February 27, 2024, 8:13am UTC](https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938/10 "2024-02-27T08:13:24Z")

</div>

Thanks I will check it today.

---

<div class="post-metadata">

**Author:** ![dkyerger](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkyerger/32/7423_2.png) [@dkyerger](https://forum.inductiveautomation.com/u/dkyerger)\
**Post date:** [May 7, 2024, 6:55pm UTC](https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938/11 "2024-05-07T18:55:48Z")

</div>

Did you get this working? I'm having a similar issue and thought I'd check in.

---

<div class="post-metadata">

**Author:** ![Ujwal\_Wankhede](https://avatars.discourse-cdn.com/v4/letter/u/4af34b/32.png) [@Ujwal\_Wankhede](https://forum.inductiveautomation.com/u/Ujwal_Wankhede)\
**Post date:** [May 30, 2024, 1:01am UTC](https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938/12 "2024-05-30T01:01:17Z")

</div>

As suggested by @Transistor, we can achieve this by adding `renderer.labels.template` properties to the axis configuration

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/5/25d1dd43c82af66dfb829a15b37a4e4abd7049e3.png)

---

<div class="post-metadata">

**Author:** ![vnayal](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vnayal](https://forum.inductiveautomation.com/u/vnayal)\
**Post date:** [June 7, 2024, 6:04am UTC](https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938/13 "2024-06-07T06:04:20Z")

</div>

Thanks Ujwal it is working

---

<div class="post-metadata">

**Author:** ![jacob\_geers](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jacob\_geers](https://forum.inductiveautomation.com/u/jacob_geers)\
**Post date:** [April 1, 2025, 3:19pm UTC](https://forum.inductiveautomation.com/t/xy-chart-x-axes-to-be-wrapped/85938/14 "2025-04-01T15:19:14Z")

</div>

For posterity, I took it a step further and implemented a line break.

**Chart Data**

```python
{
  "color": "#ff3333",
  "formatted": "3hr, 2min",
  "lev1": "Down",
  "lev2": "People",
  "lev3": "Meetings",
  "occurrences": 5,
  "seconds": 184920
}

```

**X-Axis (manually add this)**

```python
"renderer": {
  "labels": {
    "template": {
      "maxWidth": 120,
      "wrap": true,
      "truncate": false,
      "textAlign": "middle",
      "html": "{lev2}\u003cbr\u003e{lev3}"
    }
  }
}

```

**Result**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/1/81a189429e33ad9a82b0919a3daf1bcd6f2277a7.png)
