We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi I am new to processing.
I am trying to transform data into a pie chart. When I am trying to replace "angles"(point 4) with "grad" (point 3) in the pie chart function I get following error message: "grad cannot be resolved to a variable".
Should I make the variable "grad" to a global variable and how do I do that?
Thank in advance and sorry about the german comments.
Answers
(please format code (Ctrl k). I'd do it but am using phone and can't highlight blocks)
I have formatted the code for you. Please change the topic title to something more descriptive. I have moved the topic to "Questions about Code"... this forum would be a nightmare to navigate if every topic title were named in a similar fashion to this one, seeing as a large percentage of the questions asked here deal with code.
If I understand what you are trying to do, I think you just need to replace all instances of "angles" to "grad". I see on line 9 where you create the angles array. It looks like you may just need to change that to "grad" also then you should be good to go.
You can use Edit > Find and Replace to change variables across your whole sketch.
Hope this helps! ak
Yes , thank you akiersky! It worked ;). @calsign: thank you for formatting and moving the topic!
Cheers