# How to change color of timestamp and line of X-Trace in Chart

**URL:** <https://forum.inductiveautomation.com/t/how-to-change-color-of-timestamp-and-line-of-x-trace-in-chart/80416>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [October 12, 2023, 9:23pm UTC](https://forum.inductiveautomation.com/t/how-to-change-color-of-timestamp-and-line-of-x-trace-in-chart/80416 "2023-10-12T21:23:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpellicelli](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gpellicelli/32/53466_2.png) [@gpellicelli](https://forum.inductiveautomation.com/u/gpellicelli)\
**Post date:** [October 12, 2023, 9:23pm UTC](https://forum.inductiveautomation.com/t/how-to-change-color-of-timestamp-and-line-of-x-trace-in-chart/80416/1 "2023-10-12T21:23:15Z")

</div>

Hello am formation a Chart and I change label color backround and font for X-trace but The font and color of my timestamp don't change and I don't know how to acces. Any one have an idea.

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

---

<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:** [October 13, 2023, 6:55am UTC](https://forum.inductiveautomation.com/t/how-to-change-color-of-timestamp-and-line-of-x-trace-in-chart/80416/2 "2023-10-13T06:55:25Z")

</div>

I'm not sure how you could change the background color of the crosshair label, but obviously, you already know how to [add your own annotation labels](https://forum.inductiveautomation.com/t/vision-chart-not-easychart-min-max-date/70606/12), so I'll tell you how to get rid of the timestamp label at the bottom, and you can replace it with a label of your own.

```auto
# Written for the configureChart extension function 
#def configureChart(self, chart):
	from java.text import SimpleDateFormat
	from org.jfree.chart.axis import DateAxis
	pureDateFormat = SimpleDateFormat("")
	pureTimeFormat = SimpleDateFormat("")			
	dateAxis = DateAxis()
	plot = chart.getPlot()
	plot.setDomainAxis(dateAxis)
	plotField1 = plot.getClass().getDeclaredField('dateFormat')
	plotField2 = plot.getClass().getDeclaredField('timeFormat')
	plotField1.setAccessible(True)
	plotField2.setAccessible(True)
	plotField1.set(plot, pureDateFormat)
	plotField2.set(plot, pureTimeFormat)

```

I originally developed this script for [changing the date format](https://forum.inductiveautomation.com/t/easy-chart-xtrace-mark-mode-datetime-format/67159/4) of the timestamp label to "yyyy/MM/dd", but I found that if you change the date and time formats to empty strings, the label disappears.

**Result:**  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/a/1a71821ac849be80ef8119134724f728d43f1741.png)

---

<div class="post-metadata">

**Author:** ![gpellicelli](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gpellicelli/32/53466_2.png) [@gpellicelli](https://forum.inductiveautomation.com/u/gpellicelli)\
**Post date:** [October 13, 2023, 2:50pm UTC](https://forum.inductiveautomation.com/t/how-to-change-color-of-timestamp-and-line-of-x-trace-in-chart/80416/3 "2023-10-13T14:50:24Z")

</div>

Thank for your time Is I been using a previous post you have write for annotation label 😃 So am gonna just add a date format annotation format and with the color I want. Its really appreciated.
