I want to add text to a element in raphael js,
I have added text with
r.text(30, 20, "ellipse").attr({fill: color});
But how to add this text to
ec = r.ellipse(190, 100, 30, 20);
regards
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Raphael does not have child/parent relationship between elements, so you will set same position for them e.g.
So if you want a ellipse with text, create your own JavaScript object which handles positioning of both.
or alternate way is to group elements via
sete.g.