raphael.js で .data メソッドを使用しようとしています。
var r = Raphael('diagram', width, width);
[...]
var z = r.path().attr({ arc: [value, color, rad], 'stroke-width': width/24 });
z.data({"entry": entry});
z.mouseover(function(){
this.animate({ 'stroke-width': width/14, opacity: .75 }, 1000, 'elastic');
if(Raphael.type != 'VML') //solves IE problem
this.toFront();
title.stop().animate({ opacity: 0 }, speed, '>', function(){
this.attr({ text: this.data('entry').name + '\n' + this.data('entry').value + '%' }).animate({ opacity: 1 }, speed, '<');
});
残念ながら、うまくいきません。これは raphael.js のバグですか、それとも私のコードが間違っていますか?
助けてください、ありがとう。
パラメータを mouseover メソッドに渡すにはどうすればよいですか?