Set Chart Mode automatically

Hello, I’d like to set my chart Mode to X-Trace which is setMode(4) , Now what would be the best way to do it? right now I click on a button and the chart window opens up, I only want Mode set happen when the chart window opens. I suppose it some scripting needs to be done under the chart properties under pribably configureCHart or getXTraceLabel. Is there anymore info or an example on these two functions?
I’m not quite sure how to use either of those two since I could’t find a good reference on them in the manual. I’d appreciate if you all can put me on the right path! Thanks

1 Like
chart = event.source.parent.getComponent('Easy Chart')
chart.setMode(4)

try this

1 Like

try it where? configureChart or getXTraceLabel or somewhere else? my main issue what where is the right place to place the code.

1 Like

I would put it under the windows event handler scripts in internalFrameActivated. That way when the window is opened the property is set.

Thanks, Problem solved! never thought about scripting under the actual window. good to know :stuck_out_tongue:.

You can also put it in the configureChart extension function

self.setMode(4)
1 Like

ah, I see, I was curious how to use that chart config function. So basically self instead of event right?

[quote=“Mr.K001”]ah, I see, I was curious how to use that chart config function. So basically self instead of event right?[/quote]self instead of event.source.