Created
August 31, 2013 22:49
-
-
Save avasyukov/6401143 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// model.data will contain the data to be used for our report | |
model.data = []; | |
// Get managees of current user | |
var managees = orgchart.getPerson( person.properties.userName ).managees; | |
for each(var user in managees) | |
{ | |
// Find how many nodes in repository has each managee created | |
var nodes = search.luceneSearch("-TYPE:\"cm:folder\" AND @modifier:" + user.getUserName() + ""); | |
// Add one more item into report - 'x' is the object reported, 'y' is the value for this object | |
model.data.push( { "x": user.getUserName(), "y": nodes.length } ); | |
} | |
// Configure captions | |
model.xCaption = 'User'; | |
model.yCaption = 'Documents created'; | |
model.xCaptionRotation = '60'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment