Hello everyone!
I’m designing urban plan these days and one of the plans that I must create is a planting (tree) control (cut down or keep).
This is an example that I have to do. Few years ago I created this chart but in excel, counting manually the trees and making the chart. Green ones for the trees to keep, and gray ones for trees to cut down: Numbers of trees and corresponding percentage in the chart.
Now, I’m optimizing this process on revit and dynamo. I’ve put the planting trees and with Mark parameter I’ve specified if it’s for cut down or to keep
Now, I’ve been trying with dynamo and nodemodelcharts package but I have not been able to achieve it.
I don’t know what I’m missing. It’s important to say that I’m a dynamo self-taught amateur.
My attempts till today
I hope get some help soon, please, it’s important for me. Thank you everybody!
Hello,
I’d suggest taking a visit to GitHub - alfarok/NodeModelCharts: A collection of custom UI graphing nodes for Dynamo., the author has an example file showing how the node works.
Generally, you want to feed equal size lists into all three inputs
List of X labels (“Cut”,“Keep” for example)
List of X values (count how many cuts and how many keeps)
List of X colors
Instead of using List.Chop, i used ‘==’ to test whether the Mark value equaled ‘Keep’ then that split my list into ‘Keep’ & ‘Remove’. Then i was able to get a count of each list, join it into the values and it produced the graph.
2 Likes
Thanks! This is awesome.
I have last question: How do I show the percentage in the chart? I looked for in GitHub but have no clue.
There’s also some Pie Chart in the data-Shapes
1 Like
Not sure if its possible to show the percentage, im not that familiar with the package so it may just be a limitation of the node. You may need to search around for something else to use or add it in manually over the graph.
EDIT: If you mouse over the pie segments, it shows the percentages, so it is calculating them already, might need to be a github request to be able to visualize them too.