Skip to content

Can I calculate statistic (number on icon type / number of total node * 100 for example) #410

Answered by macmarrum
slhuilli1 asked this question in Help
Discussion options

You must be logged in to vote

@abc16361 a good idea. Let me take it a step further 😀

@slhuilli1 I believe it's a great idea to use icons for marking nodes for whatever purpose. And the need to count such icons isn't crazy at all 😄

The below script creates a metrics table in the details of the root node.
You could save it and run it on the root node Tools->Edit script..., or you could save it to a file, e.g. iconStatistics.groovy, and execute the script Tools->Scripts->Icon Statistics
Please see also Scripting and feel free to ask for more guidance, if needed.

def root = node.mindMap.root
def iconToCount = [:]
def totalCount = 0
root.findAll().each { node ->
    totalCount++
    node.delegate.icons.each { icon ->
        

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@abc16361
Comment options

Answer selected by dpolivaev
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants