# Easy char X trace Decimal limit

**URL:** <https://forum.inductiveautomation.com/t/easy-char-x-trace-decimal-limit/75131>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [June 16, 2023, 9:51am UTC](https://forum.inductiveautomation.com/t/easy-char-x-trace-decimal-limit/75131 "2023-06-16T09:51:09Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![prasath.t](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@prasath.t](https://forum.inductiveautomation.com/u/prasath.t)\
**Post date:** [June 16, 2023, 6:01pm UTC](https://forum.inductiveautomation.com/t/easy-char-x-trace-decimal-limit/75131/21 "2023-06-16T18:01:47Z")

</div>

@lrose

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

Display date in title also getting false. **i want to enable it**

But I couldn't able to access that property through script

i user dir to get all the property. but i couldn't able to find it

Can you please help me to access that property through script

---

<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:** [June 16, 2023, 6:14pm UTC](https://forum.inductiveautomation.com/t/easy-char-x-trace-decimal-limit/75131/22 "2023-06-16T18:14:14Z")

</div>

I thought you were using an Easy Chart?

---

<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:** [June 16, 2023, 8:01pm UTC](https://forum.inductiveautomation.com/t/easy-char-x-trace-decimal-limit/75131/23 "2023-06-16T20:01:26Z")

</div>

> [@lrose](#):
>
> thought you were using an Easy Chart

> [@prasath.t](#):
>
> i want this to be implemented for normal xy chart also

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/0/40f21d1db799b8ae4cc089b7370f638b89c12647.png)  
Hovering the mouse cursor over the property reveals what it is, and the code word for X-Axis is Domain, so you have to get the domain axis and apply the scripting name there.

Example:

```auto
event.source.parent.getComponent('Chart').chart.plot.domainAxis.displayDayInTitle

```

---

<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:** [June 16, 2023, 9:06pm UTC](https://forum.inductiveautomation.com/t/easy-char-x-trace-decimal-limit/75131/24 "2023-06-16T21:06:08Z")

</div>

Guess I missed that.

---

<div class="post-metadata">

**Author:** ![prasath.t](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@prasath.t](https://forum.inductiveautomation.com/u/prasath.t)\
**Post date:** [June 17, 2023, 2:07pm UTC](https://forum.inductiveautomation.com/t/easy-char-x-trace-decimal-limit/75131/25 "2023-06-17T14:07:31Z")

</div>

even for easy chart also it gone Fasle. thanks for the script

---

<div class="post-metadata">

**Author:** ![prasath.t](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@prasath.t](https://forum.inductiveautomation.com/u/prasath.t)\
**Post date:** [June 19, 2023, 9:16am UTC](https://forum.inductiveautomation.com/t/easy-char-x-trace-decimal-limit/75131/26 "2023-06-19T09:16:27Z")

</div>

```auto
from java.text import SimpleDateFormat
	from org.jfree.chart.axis import DateAxis
	dateFormat = SimpleDateFormat("d MMM yyyy")
	timeFormat = SimpleDateFormat("HH:mm:ss")
	dateAxis = DateAxis()
	dateAxis.lowerMargin = 0
	dateAxis.upperMargin = 0
	plot = chart.getPlot()
	plot.setDomainAxis(dateAxis)
	plotDateField = plot.getClass().getDeclaredField('dateFormat')
	plotTimeField = plot.getClass().getDeclaredField('timeFormat')
	plotDateField.setAccessible(True)
	plotTimeField.setAccessible(True)
	plotDateField.set(plot,dateFormat)
	plotTimeField.set(plot,timeFormat)
	self.chart.plot.domainAxis.displayDayInTitle = 1

```

errro i am getting

14:45:41.133 [AWT-EventQueue-0] ERROR Vision.ClassicChart - Error invoking extension method.  
org.python.core.PyException: AttributeError: 'org.jfree.chart.axis.DateAxis' object has no attribute 'displayDayInTitle'  
at org.python.core.Py.AttributeError(Py.java:178)  
at org.python.core.PyObject.noAttributeError(PyObject.java:965)  
at org.python.core.PyObject.object\_\_\_setattr\_\_(PyObject.java:3821)  
at org.python.core.PyObject.object\_\_\_setattr\_\_(PyObject.java:3792)  
at org.python.core.PyObject$object\_\_\_setattr\_\_\_exposer. **call** (Unknown Source)  
at org.python.core.PyObjectDerived. **setattr** (PyObjectDerived.java:1043)  
at org.python.pycode._pyx23.configureChart$1(:29)  
at org.python.pycode.pyx23.call\_function()  
at org.python.core.PyTableCode.call(PyTableCode.java:173)  
at org.python.core.PyBaseCode.call(PyBaseCode.java:306)  
at org.python.core.PyFunction.function\_\_\_call_(PyFunction.java:474)  
at org.python.core.PyFunction. **call** (PyFunction.java:469)  
at org.python.core.PyFunction. **call** (PyFunction.java:459)  
at org.python.core.PyFunction. **call** (PyFunction.java:454)  
at com.inductiveautomation.vision.api.client.components.model.ExtensionFunction.invoke(ExtensionFunction.java:151)  
at com.inductiveautomation.factorypmi.application.components.PMIChart.createChartImpl(PMIChart.java:481)  
at com.inductiveautomation.factorypmi.application.components.chart.PMILineChartPanel.createChart(PMILineChartPanel.java:135)  
at com.inductiveautomation.factorypmi.application.components.PMIChart.setExtensionFunctions(PMIChart.java:466)  
at com.inductiveautomation.factorypmi.designer.eventhandling.ComponentScriptEditor.applyChanges(ComponentScriptEditor.java:596)  
at com.inductiveautomation.factorypmi.designer.eventhandling.ComponentScriptEditor$5.actionPerformed(ComponentScriptEditor.java:337)  
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)  
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)  
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)  
at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)  
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)  
at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)  
at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)  
at java.desktop/java.awt.Component.processEvent(Unknown Source)  
at java.desktop/java.awt.Container.processEvent(Unknown Source)  
at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)  
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)  
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)  
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)  
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)  
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)  
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)  
at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)  
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)  
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)  
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)  
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)  
at java.base/java.security.AccessController.doPrivileged(Native Method)  
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)  
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)  
at java.base/java.security.AccessController.doPrivileged(Native Method)  
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)  
14:45:41.460 [AWT-EventQueue-0] ERROR Vision.ClassicChart - Error invoking extension method.  
org.python.core.PyException: AttributeError: 'org.jfree.chart.axis.DateAxis' object has no attribute 'displayDayInTitle'  
at org.python.core.Py.AttributeError(Py.java:178)  
at org.python.core.PyObject.noAttributeError(PyObject.java:965)  
at org.python.core.PyObject.object\_\_\_setattr\_\_(PyObject.java:3821)  
at org.python.core.PyObject.object\_\_\_setattr\_\_(PyObject.java:3792)  
at org.python.core.PyObject$object\_\_\_setattr\_\_\_exposer. **call** (Unknown Source)  
at org.python.core.PyObjectDerived. **setattr** (PyObjectDerived.java:1043)  
at org.python.pycode._pyx23.configureChart$1(:29)  
at org.python.pycode.pyx23.call\_function()  
at org.python.core.PyTableCode.call(PyTableCode.java:173)  
at org.python.core.PyBaseCode.call(PyBaseCode.java:306)  
at org.python.core.PyFunction.function\_\_\_call_(PyFunction.java:474)  
at org.python.core.PyFunction. **call** (PyFunction.java:469)  
at org.python.core.PyFunction. **call** (PyFunction.java:459)  
at org.python.core.PyFunction. **call** (PyFunction.java:454)  
at com.inductiveautomation.vision.api.client.components.model.ExtensionFunction.invoke(ExtensionFunction.java:151)  
at com.inductiveautomation.factorypmi.application.components.PMIChart.createChartImpl(PMIChart.java:481)  
at com.inductiveautomation.factorypmi.application.components.chart.PMILineChartPanel.createChart(PMILineChartPanel.java:135)  
at com.inductiveautomation.factorypmi.application.components.PMIChart.setExtensionFunctions(PMIChart.java:466)  
at com.inductiveautomation.factorypmi.designer.eventhandling.ComponentScriptEditor.applyChanges(ComponentScriptEditor.java:596)  
at com.inductiveautomation.factorypmi.designer.eventhandling.ComponentScriptEditor$4.actionPerformed(ComponentScriptEditor.java:327)  
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)  
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)  
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)  
at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)  
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)  
at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)  
at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)  
at java.desktop/java.awt.Component.processEvent(Unknown Source)  
at java.desktop/java.awt.Container.processEvent(Unknown Source)  
at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)  
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)  
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)  
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)  
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)  
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)  
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)  
at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)  
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)  
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)  
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)  
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)  
at java.base/java.security.AccessController.doPrivileged(Native Method)  
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)  
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)  
at java.base/java.security.AccessController.doPrivileged(Native Method)  
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

---

<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:** [June 19, 2023, 3:34pm UTC](https://forum.inductiveautomation.com/t/easy-char-x-trace-decimal-limit/75131/27 "2023-06-19T15:34:08Z")

</div>

> [@prasath.t](#):
>
> AttributeError: 'org.jfree.chart.axis.DateAxis' object has no attribute 'displayDayInTitle'

The DateAxis object does not have an attribute 'displayDayInTitle'. This is because the Chart objects don't use the Standard JFreeChart DateAxis, but rather a Sub Class of it.

[https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.27/com/inductiveautomation/factorypmi/application/components/chart/AutoTickDisplayDateAxis.html#setDisplayDayInTitle(boolean)](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.27/com/inductiveautomation/factorypmi/application/components/chart/AutoTickDisplayDateAxis.html#setDisplayDayInTitle(boolean))

Try this script instead:

```auto
	from java.text import SimpleDateFormat
	dateFormat = SimpleDateFormat("yyyy-MM-dd")
	timeFormat = SimpleDateFormat("HH:mm:ss")
	dateAxis = chart.plot.domainAxis
	dateAxisDateField = dateAxis.getClass().getDeclaredField('dateFormat')
	dateAxisTimeField = dateAxis.getClass().getDeclaredField('timeFormat')
	dateAxisDateField.setAccessible(True)
	dateAxisTimeField.setAccessible(True)
	dateAxisDateField.set(dateAxis,dateFormat)
	dateAxisTimeField.set(dateAxis,timeFormat)

```

Note that in this script I am not overwriting the domainAxis, so any properties that you set in the chart configuration should work as set, and you shouldn't need to set them here.

---

<div class="post-metadata">

**Author:** ![prasath.t](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@prasath.t](https://forum.inductiveautomation.com/u/prasath.t)\
**Post date:** [June 19, 2023, 5:08pm UTC](https://forum.inductiveautomation.com/t/easy-char-x-trace-decimal-limit/75131/28 "2023-06-19T17:08:10Z")

</div>

Checked Its working perfectly thanks

[Previous page](https://forum.inductiveautomation.com/t/easy-char-x-trace-decimal-limit/75131.md?page=1)
