Attr.Shapes¶
Generates a STRING of common shape attributes that can be passed to DaxLib.SVG.Element.* or DaxLib.SVG.Def.* functions
| Parameter | Type | Required | Description |
|---|---|---|---|
| fill | STRING | Fill color or gradient reference. Omitted if not specified | |
| fillOpacity | DECIMAL | Fill opacity (0-1). Omitted if not specified | |
| fillRule | STRING | Fill rule ("nonzero" or "evenodd"). Omitted if not specified | |
| stroke | STRING | Stroke color. Omitted if not specified | |
| strokeWidth | INT64 | Stroke width. Omitted if not specified | |
| strokeOpacity | DECIMAL | Stroke opacity (0-1). Omitted if not specified | |
| opacity | DECIMAL | Overall opacity (0-1). Omitted if not specified |
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 & "' ")