javascript - Retrieve attributes of raphael pie chart -


how attributes of raphael pie chart:

attributes like: stroke, values (not legend), radius, x , y position

my pie chart defined as:

pie = r.piechart(120, 140, 50, [55, 22], {     colors: ["green","red"],     stroke: "black"    }); 

i tried:

this.stroke -- says undefined

// know getting me raphael object correctly since doing work also

this.click(function () {     alert(this.stroke);  }); 

this.attr('stroke'); -- not display undefined

any idea how solve this...thanks

you can pie slice this

console.log(this.prev.prev.prev.attrs.stroke); //i know looks bit ugly... 

or pie this

console.log(pie.series[0].attrs.stroke); 

Comments