📅  最后修改于: 2022-03-11 15:04:32.035000             🧑  作者: Mango
var circle = r.circle(25,50,10).attr({fill:'#b71e16', stroke:'#71140f'});
// set it
circle.data('custom-attribute', 'value');
// get it
data = circle.data('custom-attribute');
alert(data);