cancel
Showing results for 
Search instead for 
Did you mean: 

Chart Data - Manually

Former Member
0 Kudos

Can we feed(provide) the data(values) to the chart(stackedbar) through script instead of Query? The data is already avaiable on the page and would like to make use of it. Please advice...

Accepted Solutions (0)

Answers (1)

Answers (1)

jcgood25
Active Contributor
0 Kudos

No you can't. The applets pull the raw/binary stream from the underlying query template - you can't force feed them with JavaScript.

Regards,

Jeremy

Former Member
0 Kudos

Thanks Jeremy...

Former Member
0 Kudos

Actually...

You could definitely do it with a little "magic" - what you'd need to do is to feed your chart with an Xacute query template. You'd then create a BLS transaction that took a single input parameter of type "string" (containing data as either XML, CSV, or some other text representation), which would be converted to XML, and sent back as a single output parameter of type XML.

In your web page, gather up the data from the page into some text structure (XML or CSV), and assign this string to Param.1 of your chart's query template. Simply call "updateChart(true)" and it should work fine.

It does require a small round-trip to the server, but very little overhead. The trickier part is the JavaScript to gather up the data into a single text string in XML or CSV format.

Have fun,

Rick