So here I have a function drawgrowingpie that has a function segment, that draws a pie chart. (this is taken directly from one of the examples page on raphaeljs.com). I want every segment of the pie chart to have it’s own a color. I have an array clr, which i want to distribute to every hsb attribute of every segment, but I’m a dumbass and can only figure out how to assign a single variable in my array. Can someone help point me in the right direction?
You can see what im talking about here: http://jsfiddle.net/6hzfH/
Given that code, just pass an aditional parameter to the
segmentfunction, namely the current iteration, and use it to address theclrarray. You can check that here