...
Resizing attributes in the svg root element | Resizing behaviour | |||||||
---|---|---|---|---|---|---|---|---|
| The svg document is scaled to fit the display window and the aspect ratio is preserved. | |||||||
| The svg document is scaled and stretched to fill the window (aspect ratio is not preserved). | |||||||
| Only the region with coordinates 0 <= x <= 1200 and 0 <= y <= 700 pixels is shown. The svg document is not resized when the display window is resized. |
Aligning text within svg text objects
By default text in an svg text object is left-aligned and the x and y coordinates of the object denote the upper-left corner of the object. To right-align text in an svg text object, add the following attribute to the text element:
Code Block | ||||
---|---|---|---|---|
| ||||
text-anchor="end" |
The entire element would then e.g. be:
Code Block | ||||
---|---|---|---|---|
| ||||
<text id="Delft" x="757.48602" y="308.03317" style="fill:#000099" text-anchor="end">%LASTVALUE(numberFormat1)% meter</text> |
When an object is right-aligned, then the x and y coordinates of the object denote the upper-right corner of the object.
The attribute text-anchor can also have the values "start" or "middle". To create multiple pieces of text with different alignments, use separate text objects.
When using right-alignment, the decimal separator for number values can be aligned by using the following number format:
Code Block | ||||
---|---|---|---|---|
| ||||
{0,number,#.00} |
Here "#" means one or more decimals before the decimal separator and ".00" means that always two decimal places are shown (number is either rounded or padded with zero's).