Attr.Shapes¶
Creates SVG attribute strings for common shape styling properties
| Parameter | Type | Required | Description |
|---|---|---|---|
| fill | STRING | Fill color (e.g., "#FF0000", "red") | |
| fillOpacity | DOUBLE | Fill opacity value between 0 and 1 | |
| fillRule | STRING | Fill rule ("nonzero", "evenodd") | |
| stroke | STRING | Stroke color (e.g., "#000000", "black") | |
| strokeWidth | INT64 | Width of the stroke | |
| strokeOpacity | DOUBLE | Stroke opacity value between 0 and 1 | |
| opacity | DOUBLE | Overall opacity value between 0 and 1 |
STRING An attribute string that can be used directly in SVG elements
function 'DaxLib.SVG.Attr.Shapes' =
(
fill: STRING,
fillOpacity: DOUBLE,
fillRule: STRING,
stroke: STRING,
strokeWidth: INT64,
strokeOpacity: DOUBLE,
opacity: DOUBLE
) =>
IF( NOT ISBLANK( fill ), "fill='" & fill & "' ") &
IF( NOT ISBLANK( fillOpacity ), "fill-opacity='" & fillOpacity & "' ") &
IF( NOT ISBLANK( fillRule ), "fill-rule='" & fillRule & "' ") &
IF( NOT ISBLANK( stroke ), "stroke='" & stroke & "' ") &
IF( NOT ISBLANK( strokeWidth ), "stroke-width='" & strokeWidth & "' ") &
IF( NOT ISBLANK( strokeOpacity ), "stroke-opacity='" & strokeOpacity & "' ") &
IF( NOT ISBLANK( opacity ), "opacity='" & opacity & "' ")