StatData: Object
The StatData property contains statistic data of an express report.
Property value can be set from JSON or using the setStatData method, and returned using the getStatData method.
The property stores a value as an array of JSON object with the following fields: k - key of a summary statistic, n - statistic name, nodeType - type of HTML document node, type - statistic type, value - value, vis - indicates statistic's visibility.
Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). Open the Table data view and get information on the summary statistic Median:
var eaxAnalyzer = expressBox.getSource(); var statData = eaxAnalyzer.getStatData(); for (var i = 0; i < statData.length; i++) { var option = statData[i]; if (option.type == "Median") { console.log("Key: " + option.k); console.log("Name: " + option.n); console.log("Value: " + option.value); console.log("Visible: " + option.vis); } }
After executing the example the browser console displays data on the Median statistic:
Key: 5
Name: Median
Value: NaN
Visible: True
See also: