Skip to content

Element.Group

Generates a <g> element. Transformations applied to the <g> element are performed on its child elements, and its attributes are inherited by its children. It can also group multiple elements to be referenced later with the <use> element.

DaxLib.SVG.Element.Group( contents, transform, opacity )
Name Type Required Description
contents STRING Content to group
transform STRING Transform (e.g., "translate(50,50) rotate(45)")
opacity STRING Opacity for entire group (0-1)

STRING <g> element

DaxLib.SVG.Element.Group(
    "<circle ... />", 
    "translate(10,10)", 
    0.8
    )
// Returns: <g transform='translate(10,10)' opacity='0.8'><circle ... /></g>
function 'DaxLib.SVG.Element.Group' =
    (
        contents : SCALAR VAL,
        transform : SCALAR VAL,
        opacity : SCALAR VAL
    ) =>

        "<g" &
        " transform='" & transform & "'" &
        " opacity='" & opacity & "'" &
        ">" & contents & "</g>"

Comments