It is currently Fri Jul 25, 2014 7:19 am




Post new topic Reply to topic  [ 3 posts ] 
 Classic Chart dynamically change date range 
Author Message
Cadet
Cadet

Joined: Mon Apr 23, 2012 4:53 am
Posts: 9
Post 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 ! :(


Fri Jun 08, 2012 12:42 am
Profile
Cadet
Cadet

Joined: Mon Apr 23, 2012 4:53 am
Posts: 9
Post Re: Classic Chart dynamically change date range
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 :(

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 ......


Attachments:
classicChartDateRange.png
classicChartDateRange.png [ 136.13 KiB | Viewed 566 times ]
Fri Jun 08, 2012 1:16 am
Profile
Moderator
Moderator

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 1982
Location: Sacramento, CA
Post Re: Classic Chart dynamically change date range
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:
Code:
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.

_________________
Travis Cox
Inductive Automation
Technical Support Rep.


Fri Jun 08, 2012 7:09 am
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: