In order for an iChart in Line mode to show a trend line like a basic Simulator tag query in History mode you need to make the SQLQuery 'time based''. This is done by mapping a times tamp column in query mode or using the [SD] and [ED] tokens in your fixed query. The chart and the time refresh controls don't know which field is your date time column, nor can it reforms late the new query requests when you scroll forward or backward in time. This happens behind the scenes in Tag queries, but for non-tag query templates you need to enable this. Consider a table with 2 columns called MyDateTime and MyValue with a real date time and not a string, and a numerical value. Then consider a simple query like this: SELECT * FROM MyTable WHERE MyDateTime BETWEEN [SD] AND [ED] ORDER BY MyDateTime ASC Map your ValueColumns to MyValue and set auto scaling to true (not server scaling). The chart in line mode should take care of the rest. At runtime when you pick the date buttons in the time refresh control bar or the left/right navigational controls, the query will be reformulated and the date tokens will send the new dates to the DB query. Don't forget that the default date criteria in your query will default to the last 60 minutes, so set these fields accordingly.
↧