Viz.Bars¶
Renders a bar chart as an SVG data URI showing measure values across an axis
DaxLib.SVG.Viz.Bars( axisRef, measureRef, color, minMarkColor, maxMarkColor, showAxis, width, height )
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| axisRef | ANYREF EXPR | Axis reference column | ||
| measureRef | NUMERIC EXPR | Measure expression | ||
| color | STRING | BLANK() |
Optional series color. Defaults to theme color | |
| minMarkColor | STRING | BLANK() |
Optional: The hex color for the minimum value bar | |
| maxMarkColor | STRING | BLANK() |
Optional: The hex color for the maximum value bar | |
| showAxis | BOOLEAN | FALSE() |
Optional axis toggle. Defaults to FALSE | |
| width | INT64 | 120 |
Optional: SVG width. Defaults to 120 | |
| height | INT64 | 48 |
Optional: SVG height. Defaults to 48 |
STRING SVG Bar Chart
function 'DaxLib.SVG.Viz.Bars' =
(
axisRef: ANYREF EXPR,
measureRef: NUMERIC EXPR,
color: STRING = BLANK(),
minMarkColor: STRING = BLANK(),
maxMarkColor: STRING = BLANK(),
showAxis: BOOLEAN = FALSE(),
width: INT64 = 120,
height: INT64 = 48
) =>
VAR _Marks =
DaxLib.SVG.Compound.Bars(
0,
0,
width,
height,
axisRef,
measureRef,
color,
minMarkColor,
maxMarkColor,
showAxis
)
RETURN
IF( NOT ISBLANK( _Marks ), DaxLib.SVG.SVG( "100%", "100%", _Marks, "0 0 " & width & " " & height ) )