--- In [email protected], Thomas Liesner <[EMAIL PROTECTED]> wrote: > > Jeff Schiller schrieb: > > > > > > > > > First problem is that cx/cy are not valid attributes of the text > > element, it's simply x/y. > > Thanks ;) Stupid me... > > > Next, are you transforming the <g> > > element for each of the 500 elements? > > Yes, is there anything wrong with that? I know i should probably define > all the style-stuff in a css-class. But aside from that? > > TIA, > Tom >
I guess "wrong" is a relative term here. You've got 500 planets and you have to position each circle and text individually. The text is always +15 in the y-direction. Best bet would be to do this: <g class="planet" transform="translate(500,380)"> <circle cx="0" cy="0" r="5" .../> <text x="0" y="15" ...>Planet Foo</text> </g> This is because if you move one planet's coordinates you also have to adjust its text position. Then again, if you decide to change the planet's radii, then you have to change EVERY text position. This is also very brittle. - you could generate your SVG using some PHP that iterates through each element in a table/database - you could generate your SVG using XSLT that takes each planet's description in XML and tranforms it into SVG - you could have a createPlanet() JavaScript function that generates each planet given a name and some coordinates I'd be curious to see if there's a "purely SVG" way to do something like this. Regards, Jeff ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/1U_rlB/TM --------------------------------------------------------------------~-> ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

