Classic Chart dynamically change date range

Hi ! feel like posting too much in too short period of time; and I swear I try myself before asking but still too novice I guess.

I want to use a classic Chart (not the easy at all) and change its “mode” from historical to real, and vice versa, depending upon a button. I’ve already got to show/hide auxiliar components (calendars to set the historical range) for each mode but not yet the main goal.

With easy chart it was quite straight forward but the classic chart it’s not so easy, I guess it must be done via “indirect bindings” but how?¿ The easy chart has the attribute chartMode but classic doesn’t ! :frowning:

to set it clearer (I do not alway express my self right enough in english), the attached figure show my intentions :

whenever I press the “Historical” button, its text change to “Real” and all the inputs below change to visible=1. But the chart I haven’t got to set it to real time :frowning:

The fact is that the easy chart controls for the histotical range are not as intuitive as I need to make queries to retrieve info grouped by seconds, minutes …


Realtime mode just means the query is polling on the easy chart. What you need to do is make the SQL query on the classic chart set to “Polling Off” so it only runs once. You can put a timer on the window that can re-run the query on the chart. You can use a propertyChange script for that on the timer:if event.propertyName == "value": system.db.refresh(event.source.parent.getComponent("Classic Chart"), "Data")You can set the timer’s running checkbox to true when you want it to poll and false when you don’t. Hope that helps.