RatingChart/*** Rating Reports Chart Control** @param str $name - name of the report* @param map $data - report data from reporting service* @param num $total - total number of pages* @param uri $resetUri - uri to main site report* @param map $site - site level report data (optional)*/
var reportType = $type;var reportData = $data;
var totalPages = $total;var siteData = $site;
var resetUri = $resetUri;// shorthand for localization keys
var localizePrefix = "MindTouch.ContentAnalytics.".. reportType;if (reportData.meta[reportType].count == 0) {<div class="no-results"><div class="no-results-text">
wiki.localize( localizePrefix .. ".data.empty");</div></div>}// results output
if (!siteData) {<h3 class="reports">wiki.localize(localizePrefix ..".title")</h3>} else {<h3 class="reports">
wiki.localize(localizePrefix ..".title.search");if (reportData.meta[reportType].query) {<div class="reset-search"><a href=(resetUri)>wiki.localize("MindTouch.Reports.searc</div>
}
</h3>
}
<div class="mt-report-overview"><dl class="stats">

<dt class="first"><span class="title">wiki.localize(localizePrefix .. ".stat.pa
if (siteData) {<span class="site">wiki.localize("MindTouch.ContentAnalytics.stat.site")" ";siteData.meta[reportType].count;</span>}</dt><dd class="first"><span>
wiki.localize(localizePrefix .. ".stat.pagecount.value", [rep</span><span class="help">wiki.localize(localizePrefix .. ".stat.pag</dd><dt class="second"><span class="title">wiki.localize(localizePrefix .. ".stat.av
if (siteData) {<span class="site">wiki.localize("MindTouch.ContentAnalytics.stat.site")" ";wiki.localize(localizePrefix .. ".stat.average.value",[siteData.meta[reportType].average]);</span>}</dt><dd class="second"><span>
wiki.localize(localizePrefix .. ".stat.average.value",[reportData.meta[reportType].average]);</span><span class="help">wiki.localize(localizePrefix .. ".stat.ave</dd>switch (reportType) {case "rating":<dt class="third"><span class="title">wiki.localize(localizePrefix .. ".staif (siteData) {<span class="site">wiki.localize("MindTouch.ContentAnalytics.stat.site")" ";let percent = num.round((1 - (siteData.meta[reportType].count / totalPage);
wiki.localize(localizePrefix .. ".stat.unrated.value",[percent]);</span>}</dt><dd class="third"><span>
let percent = num.round((1 - (reportData.meta[reportType].count / totalPa);
wiki.localize(localizePrefix .. ".stat.unrated.value",[percent]);</span><span class="help">wiki.localize(localizePrefix .. ".stat</dd>case "aging":<dt class="third"><span class="title">wiki.localize(localizePrefix .. ".staif (siteData) {<span class="site">wiki.localize("MindTouch.ContentAnalytics.stat.si" ";siteData.meta[reportType].countAboveTwoYears;</span>}</dt><dd class="third"><span>
reportData.meta[reportType].countAboveTwoYears;</span><span class="help">wiki.localize(localizePrefix .. ".stat</dd>}<dt class="information"><div>wiki.localize(

localizePrefix .. ".information",[reportData.meta[reportType]["csv.uri"]])</div></dt></dl>// determine if the charting component is available
if (__env["anychart"]) {<div class="chart">
var seriesLabel = wiki.localize(localizePrefix ..".chart.series")
template("MindTouch/Controls/Chart", {width: "500",
height: "325",
min: 0,
type: "line",
data: {
(seriesLabel): reportData.series[reportType]},
xaxis: wiki.localize(localizePrefix ..".chart.xaxis"),yaxis: wiki.localize(localizePrefix ..".chart.yaxis"),title: wiki.localize(localizePrefix ..".chart.title")});</div>} else {<div class="chart ui-state-disabled"><div>wiki.localize("MindTouch.Co}</div>// end no-results