cancel
Showing results for 
Search instead for 
Did you mean: 

Chart with Tag Query

Former Member
0 Kudos

Similarly to this post

I have a Tag Query pulling data for the past X number of days and then display it in a chart.

I want to add to 2 fixed lines into this chart, similar to an SPC Chart -


basically showing how close/off that tag is from these lines.

The only thing I can think off is changing my Tag Query to a SQL query and adding these two fixed values in there ---but I would rather not do that. I would prefer to keep the Tag Query (reusability purposes)

Come on applet lovers, show me the way and tell me what to do to get them in there!

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Kudos

Brian,

'Applet Lovers' - is that a new at Pizza Hut?

If you wrap your TagQuery in a BLS trx and create an IllumDoc that looks like:

DateTime Line1 Line2

SD 12 34

ED 12 34

Then just merge the two documents (the TagQuery and the IllumDoc) so you will have a full OutputXML from the TRX that looks like:

<Rowsets>

<Rowset/> {Tag.1}

<Rowset/> {Tag.n}

<Rowset/>

</Rowsets>

The iChart will then see the limit lines as if they were tagnames all along and will plot two lines from SD to ED.

If you only have a single Rowset returning from you TagQuery, then even easier would just be to add a CalculatedColumn block onto it with 2 static number columns. The chart will like this format too (a lot like a multiple tagname Simulator query).

Regards,

Jeremy

Answers (1)

Answers (1)

Former Member
0 Kudos

Ok, it worked for the most part - except the dates on the x axis are now showing up as "1,194,368,517,000"

I've tried a lot of massaging but for some reason the display template doesnt inherently know how to display the date now.

Former Member
0 Kudos

Hi, Brian. Be sure to add StartDate and EndDate input parameters to your BLS transaction, to map them to the StartDate/EndDate of the query action(s), and to map them in the parameters tab of the Xacute query template.

Former Member
0 Kudos

I'm not using a SD or ED within my Tag Query. It is defaulted to run a History query for the last 7 days of data. Although, in my mind, that shouldn't make a difference. The data still comes back in the same format, no?

jcgood25
Active Contributor
0 Kudos

Brian,

Don't question, just do it. Even though the output of the TRX looks the same, you are telling the iChart to be Line mode, but not giving it the knowledge about being time based for scrolling forwards and backwards, etc. The Xacute wrapper query needs to use the SD and ED mapping parameter in order to pass them through into your tag query and return the dataset accordingly. This happens automatically when it is a tag query because of the history type modes and standard expected behavior, but when you wrap it with Xacute you need to provide the correlation and realization to the applet that the Line mode is to work like the original Tag trend.

You are seeing the java long numerical representations of your dates on the XAxis, but for the nice and friendly Date over Time formatted strings on the axis, similar to what you get with a History query, then you must map the dates into your Xacute query.

Regards,

Jeremy

Former Member
0 Kudos

Wow - thats awesome. I feel like I should yell "Yes Drill Sergeant!"

Will do, right away, SD and ED going in! Over and out

Former Member
0 Kudos

hai, sensei

"Question Everything!" -- Maria Mitchell