Jeff Schiller schrieb:

> >
> > > Next, are you transforming the <g>
> > > element for each of the 500 elements?
> >
> > Yes, is there anything wrong with that?
> >
>
> 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.

Okay, until now i did not know about this option. I have to have a look
at the transform-attribute. Thanks.

> Then again, if you decide to change the planet's radii, then you
> have to change EVERY text position.  This is also very brittle.

Okay, but i never thought about writing all this data myself, because...

>
> - you could generate your SVG using some PHP that iterates through
> each element in a table/database

... i use python to get the desired data from postgresql and write the
svg (and the 500 detail-svgs...).

> - 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

Various options ;)

> I'd be curious to see if there's a "purely SVG" way to do something
> like this.

I don't think anyone would want to.
Thanks,
Tom


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/I258zB/QnQLAA/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/
 


Reply via email to