# Chart configured as XY plot, truncating X Axis Tick Labels on Right Margin

**URL:** <https://forum.inductiveautomation.com/t/chart-configured-as-xy-plot-truncating-x-axis-tick-labels-on-right-margin/95804>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [September 10, 2024, 2:56pm UTC](https://forum.inductiveautomation.com/t/chart-configured-as-xy-plot-truncating-x-axis-tick-labels-on-right-margin/95804 "2024-09-10T14:56:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [September 10, 2024, 2:56pm UTC](https://forum.inductiveautomation.com/t/chart-configured-as-xy-plot-truncating-x-axis-tick-labels-on-right-margin/95804/1 "2024-09-10T14:56:01Z")

</div>

Vision 8.1.38

I have a chart configured as XY Chart. I use it to dynamically draw 2 point linear relationships adjusted by the operator. I've used this for a couple of years, and it works fine if the right most digit is 3 characters or less. But I have a new application where the upper range is 1000. No matter what I do, the number gets truncated. Font or number style has no affect. Stretching the chart also has no affect to the rightmost number.

Google search led me to Fusion Charts which must share the same widget, as the exact same problem was described and the developer said the number hides below the canvas in this case, and the only way to tease it out is to rotate the numbers, which isn't an option on the Axis properties. Evidently, expanding the white space beyond the chart isn't an option to show the number.

Is there any other property that would resolve this?

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

---

<div class="post-metadata">

**Author:** ![Gaurav.Shitole](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gaurav.shitole/32/72050_2.png) [@Gaurav.Shitole](https://forum.inductiveautomation.com/u/Gaurav.Shitole)\
**Post date:** [September 10, 2024, 8:52pm UTC](https://forum.inductiveautomation.com/t/chart-configured-as-xy-plot-truncating-x-axis-tick-labels-on-right-margin/95804/2 "2024-09-10T20:52:16Z")

</div>

Is there a way that you could add one extra tick mark on X-Axis?  
Like if max value of X-Axis is 1000 having 10 ticks from 100-1000. Can you have max value as 1100 instead? Max value of x axis will be added into min value of x axis

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [September 10, 2024, 9:28pm UTC](https://forum.inductiveautomation.com/t/chart-configured-as-xy-plot-truncating-x-axis-tick-labels-on-right-margin/95804/3 "2024-09-10T21:28:58Z")

</div>

I don't think the chart allows you to specify # of tick marks. It auto adjusts based on width of chart, lower and upper bound values.

But I did overlook a property, "Vertical Tick labels", that rotates the numbers 90 degrees. Then they are not truncated.

Not ideal, but is better than the truncated values.

---

<div class="post-metadata">

**Author:** ![Gaurav.Shitole](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gaurav.shitole/32/72050_2.png) [@Gaurav.Shitole](https://forum.inductiveautomation.com/u/Gaurav.Shitole)\
**Post date:** [September 10, 2024, 9:32pm UTC](https://forum.inductiveautomation.com/t/chart-configured-as-xy-plot-truncating-x-axis-tick-labels-on-right-margin/95804/4 "2024-09-10T21:32:20Z")

</div>

Ok that trick works.

What if you just add 1100 to your X-Axis data then? It seems to be auto scaling for X axis so it would work

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [September 11, 2024, 2:09pm UTC](https://forum.inductiveautomation.com/t/chart-configured-as-xy-plot-truncating-x-axis-tick-labels-on-right-margin/95804/5 "2024-09-11T14:09:13Z")

</div>

No, it scales to the upper bound of the X-Axis property, not the dataset.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 11, 2024, 3:15pm UTC](https://forum.inductiveautomation.com/t/chart-configured-as-xy-plot-truncating-x-axis-tick-labels-on-right-margin/95804/6 "2024-09-11T15:15:30Z")

</div>

This is just the standard chart component correct?

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [September 11, 2024, 3:31pm UTC](https://forum.inductiveautomation.com/t/chart-configured-as-xy-plot-truncating-x-axis-tick-labels-on-right-margin/95804/7 "2024-09-11T15:31:50Z")

</div>

Yes

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 11, 2024, 4:27pm UTC](https://forum.inductiveautomation.com/t/chart-configured-as-xy-plot-truncating-x-axis-tick-labels-on-right-margin/95804/8 "2024-09-11T16:27:00Z")

</div>

I have a workaround, though it's not great. Haven't quite figured out how to force the ChartPanel to increase/decrease it's insets to make room.

However, what you can do, is create an additional dataset for the chart. It will not hold any data, it's only purpose is to give you a way to add an additional range axis on the right.

Create an additional y-axis. Set the following properties of the axis:  
Axis Label: (Empty String)  
Tick Label Color: Transparent  
Tick Marks Visible: False  
Axis Position: Bottom/Right

Then in the dataset properties set the Y-Axis of your new dataset to your new Y-Axis. This will have the effect of adding more space on the right side of the chart.

A pretty hacky solution, but it works.

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [September 12, 2024, 1:50pm UTC](https://forum.inductiveautomation.com/t/chart-configured-as-xy-plot-truncating-x-axis-tick-labels-on-right-margin/95804/9 "2024-09-12T13:50:43Z")

</div>

That works, however the label must not be an empty string, but spaces. Pretty smart, however!

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 12, 2024, 2:09pm UTC](https://forum.inductiveautomation.com/t/chart-configured-as-xy-plot-truncating-x-axis-tick-labels-on-right-margin/95804/10 "2024-09-12T14:09:53Z")

</div>

> [@robertm](#):
>
> however the label must not be an empty string

Interesting, all I did was delete the string in the label property.

Glad it's working for you.
