Skip to content

Element.Polyline

Generates a <polyline> (connected points) element

DaxLib.SVG.Element.Polyline( points, attributes, transforms )
Name Type Required Description
points STRING Space-separated x,y coordinate pairs (e.g., "0,10 20,30 40,15")
attributes STRING Direct SVG attributes to apply (e.g., "marker-start='url(#dot)'"), can generate with DaxLib.SVG.Attr.* or manually
transforms STRING Transformation to apply (can be generated with DaxLib.SVG.Transforms)

STRING <polyline> element

DaxLib.SVG.Element.Polyline(
    "0,10 20,30 40,15",
    DaxLib.SVG.Attr.Lines("none", "#0078D4", "2", BLANK(), BLANK(), BLANK(), BLANK()),
    "translate(5,5)"
)
// Returns: <polyline points='0,10 20,30 40,15' fill='none' stroke='#0078D4' stroke-width='2' transform='translate(5,5)' />
function 'DaxLib.SVG.Element.Polyline' =
    (
        points: STRING,
        attributes: STRING,
        transforms: STRING
    ) =>

        "<polyline" &
        " points='" & points & "'" &
        IF( NOT ISBLANK( attributes ), " " & attributes & " " ) &
        IF( NOT ISBLANK( transforms ), " transform='" & transforms & "'" ) & 
        "/>"

Comments