CT.5.2 Bind Chart to Query or Worksheet (Report/Viewsheet)
Use runQuery() only in element-level script.
To bind data to a chart from an arbitrary query or Data Worksheet in element-level script, use the runQuery() function and assign the result to the chart's data or dataset property.
Chart1.data = runQuery("sales by state");
graph = new EGraph();
var elem = new IntervalElement("State", "Sales");
graph.addElement(elem);
You can see an example of this approach in Creating a Chart Using API Functions.
See Also
Running a Query from Script in Dashboard Scripting details about the syntax of runQuery().
Running a Query from Script in Report Scripting for details about the syntax of runQuery().
| << CT.5.1 Bind Chart Using Chart Editor (Report/Viewsheet) | © 1996-2013 InetSoft Technology Corporation (v11.4) | CT.5.3 Bind Chart to Query or Worksheet (Report Only) >> |