[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

SVG - positionering af elementer



Hej

Jeg skal til at lege lidt med noget SVG til at visualisere nogle data, men jeg kan ikke helt finde ud af at positionere elementerne.

Jeg vil have noget tekst i venstre side, og til højre for den bredeste tekststreng, skal der være nogle bokse (horizontal graf).
Følgende illustrerer, hvad jeg mener:

<?xml version="1.0" encoding="utf-8"?>

<svg  xmlns="http://www.w3.org/2000/svg";
      xmlns:xlink="http://www.w3.org/1999/xlink";>
    <text x="5" y="30" font-family="Verdana" font-size="30">Hello, World!</text>
    <rect x="200" y="3" width="200" height="30" style="fill: #00ff00"/>

    <text x="5" y="65" font-family="Verdana" font-size="30">Noget tekst</text>
    <rect x="200" y="38" width="150" height="30" style="fill: #00ff00"/>
</svg>


Nu har jeg så hardkodet rektanglernes X koordinat, men kan man ikke gøre noget smartere ? For jeg ved reelt ikke, hvor bred den bredeste streng bliver, når den er renderet.

Skal man ud i at embedde scripts i SVG'en ?

På forhånd tak,
Robert


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2009-07-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *