Skip to content

Instantly share code, notes, and snippets.

@stevedep
Created October 9, 2022 06:21
Show Gist options
  • Save stevedep/00491a6b2efe427f8b68f28aead5d898 to your computer and use it in GitHub Desktop.
Save stevedep/00491a6b2efe427f8b68f28aead5d898 to your computer and use it in GitHub Desktop.
for Loop
for (var i = 0; i < kpiVals.length; i++)
{
let selectionId: ISelectionId = this.host.createSelectionIdBuilder()
.withCategory(categorical.categories[kpiId], i)
.createSelectionId();
this.kpiDataPoints.push({
kpivalue : <string>kpiVals[i],
colour : (category.objects) ? category.objects[i] ? String(<Fill>(category.objects[i].colorSelector.fill['solid']['color'])) : "#FF0000" : "#FF0000", //objects is initially not present
highlight: (measurevals.highlights) ? (measurevals.highlights[i]) ? "Y" : "N" : "N",
index: i,
selectionId: selectionId,
selector : selectionId.getSelector()
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment