# Easy Chart Tick Label Alignment

**URL:** <https://forum.inductiveautomation.com/t/easy-chart-tick-label-alignment/112717>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [December 10, 2025, 12:05am UTC](https://forum.inductiveautomation.com/t/easy-chart-tick-label-alignment/112717 "2025-12-10T00:05:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jennifer.chang](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jennifer.chang](https://forum.inductiveautomation.com/u/jennifer.chang)\
**Post date:** [December 10, 2025, 12:05am UTC](https://forum.inductiveautomation.com/t/easy-chart-tick-label-alignment/112717/1 "2025-12-10T00:05:32Z")

</div>

I am having trouble figuring out how to right align my Easy Chart tick labels. For example, the screenshot below shows the values as left aligned:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/a/daa4215e0809d2dcf75b2f9264b635fa08d83f78.png)

However, I would like them to be right aligned. Is there some way easy way to do this that I am missing? Right now, the only thing I can figure out is to just cover them up and type my own labels as separate components but that’s not ideal - it’s more of a patch than a solution.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [December 19, 2025, 4:23am UTC](https://forum.inductiveautomation.com/t/easy-chart-tick-label-alignment/112717/2 "2025-12-19T04:23:36Z")

</div>

I was able to do this using a custom number format and a monospaced font:

**Result:**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/3/d39cb2e5d08a95e55d04cc3c42e17613b1951187.png)

**configureChart extension function script:**

```python
#def configureChart(self, chart):
	from java.awt import Font
	from java.text import NumberFormat
	
	# Create a custom number format that will right align labels up to 5 characters in length
	maxCharacterLength = 5
	class AlignedFormat(NumberFormat):
		def format(self, number, toAppendTo, pos):
			text = unicode(int(number))
			
			# Assumes that a text label will never be more than 5 characters
			# simply adds spaces to the left
			toAppendTo.append(text.rjust(maxCharacterLength))
			return toAppendTo

	for index in xrange(chart.plot.rangeAxisCount):
		axis = chart.plot.getRangeAxis(index)
		
		# Create a monospaced version of the current axis font, so kerning won't affect alignment
		originalFont = axis.tickLabelFont
		monoFont = Font(
			Font.MONOSPACED,
			originalFont.style,
			originalFont.size
		)
		
		# Update the current axis with the custom font and number format to perfectly right align the text
		axis.tickLabelFont = monoFont
		axis.setNumberFormatOverride(AlignedFormat())

```

This script could be made more flexible and efficient by moving it to a library function with the `axis` and `maxCharacterLength` variables as arguments.

---

<div class="post-metadata">

**Author:** ![jennifer.chang](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jennifer.chang](https://forum.inductiveautomation.com/u/jennifer.chang)\
**Post date:** [December 19, 2025, 7:27pm UTC](https://forum.inductiveautomation.com/t/easy-chart-tick-label-alignment/112717/3 "2025-12-19T19:27:37Z")

</div>

Worked perfectly! Thank you @justinedwards.jle!
