I have a window with an Easy Chart and I use a script in the window’s internalFrameActivated event handler to automatically put the Easy Chart in X-Trace mode. I would like to prevent the user from having to click in the chart to display the vertical dotted line and the X-Trace label(s). Is there a script function I can use to set the X-Trace time for the Easy Chart?
I see that the selectedXValue property of the Easy Chart contains the currently selected X-Trace time. Essentially, what I want to do is write to that property instead of read it but it doesn’t seem to be writeable. I ran the dir() function on the Easy Chart and I see that it includes a method called setSelectedXValue. I tried using that method in a script but it doesn’t seem to do anything. I don’t get an error message but the Easy Chart XValue doesn’t change. I’ve got two Easy Charts in my window one named ‘Easy Chart’ and the other named ‘Easy Chart 1’. Both are in X-Trace mode and are set to the same start date and end date. I have a button with the following code:
component = event.source.parent.getComponent(‘Easy Chart’)
newXValue = event.source.parent.getComponent(‘Easy Chart 1’).selectedXValue
Do I need to do something else to ‘Easy Chart’ to make it update?