Skip to content

Instantly share code, notes, and snippets.

@james-gibson
Created October 28, 2012 18:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save james-gibson/3969312 to your computer and use it in GitHub Desktop.
<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