Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<amcharts:AmGraph
id="icGraph"
fillAlphas="[1]"
fillColors="[mbtuUsageColor]"
lineAlpha="0"
title=""
type="column"
valueAxis="{contributionAxis}"
valueField="percentOfInstallationMbtuUsage"
/>
<amcharts:AmGraph
id="benchmarkGraph"
fillAlphas="[1]"
fillColors="[benchmarkScoreColor]"
lineAlpha="0"
title=""
type="column"
valueAxis="{benchmarkScoreAxis}"
valueField="benchmarkScore"
/>
for each (var buildingType:String in buildingTypeList)
{
var item:Object = new Object();
item.buildingType = buildingType;
item.mbtuUsage = buildingTypeSums[buildingType];
item.percentOfInstallationMbtuUsage = Math.round((item.mbtuUsage / totalMbtuUsage) * 100);
item.benchmarkScore = buildingTypeBenchmarkScoreSums[buildingType]/buildingTypeList.length;
//Visual Settings
item.benchmarkScoreColor = item.benchmarkScore > 0 ? "#C80000" : "#00C5FF";
item.mbtuUsageColor = item.mbtuUsage > 0 ? "#000000" : "#FFFFFF";
_buildingTypeConsumption.addItem(item);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment