# Display X Value as Label on Easy Chart

**URL:** <https://forum.inductiveautomation.com/t/display-x-value-as-label-on-easy-chart/108957>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [July 25, 2025, 5:41pm UTC](https://forum.inductiveautomation.com/t/display-x-value-as-label-on-easy-chart/108957 "2025-07-25T17:41:51Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [July 30, 2025, 5:19pm UTC](https://forum.inductiveautomation.com/t/display-x-value-as-label-on-easy-chart/108957/7 "2025-07-30T17:19:51Z")

</div>

> [@byutz](#):
>
> Should the label creating code not live in configureChart routine?

It absolutely should, and I think you're making it far more complicated than it needs to be.

See:

> [@Formatting chart labels in reporting V7.9?](https://forum.inductiveautomation.com/t/formatting-chart-labels-in-reporting-v7-9/38032/6):
>
> Yeah, So I was only providing an example, to show a simple solution for what it would look like. Probably should have just not been lazy and actually included a detailed explanation as well. sweat_smile So for this generator, the MessageFormat ArgumentIndex values correspond to the following: 0 = series name 1 = domain or X-Axis Value 2 = range or Y-Axis Value The number between the ‘{}’ tells the generator which value/s to use in the label output. You can include text that will be t…

I understand that post is from quite a while ago, and different version of the software, but it should still apply.

Try this code:

```python
def configureChart(self, chart):
	from org.jfree.chart.labels import StandardXYItemLabelGenerator
	from java.text import DateFormat
	from java.text import NumberFormat
	
	renderer = chart.plot.renderer
	xFormat = DateFormat.getDateTimeInstance()
	yFormat = NumberFormat.getNumberInstance()
	renderer.setItemLabelGenerator(StandardXYItemLabelGenerator('{1}',xFormat,yFormat))
	renderer.setBaseItemLabelsVisible(True)

```

Note, it won't take many data points for this to become unreadable. You can of course provide a more granular format for the date format.

---

_[View the full topic](https://forum.inductiveautomation.com/t/display-x-value-as-label-on-easy-chart/108957)._
