Axes.Point¶
Maps axis/value data to plot coordinates honoring orientation
DaxLib.SVG.Axes.Point( orientation, axisIndex, measureValue, xMin, xMax, yMin, yMax, plotX, plotY, plotWidth, plotHeight )
| Parameter | Type | Required | Description |
|---|---|---|---|
| orientation | STRING | "Horizontal" or "Vertical" | |
| axisIndex | NUMERIC VAL | The axis index value to map | |
| measureValue | NUMERIC VAL | The measure value to map | |
| xMin | NUMERIC VAL | X-axis minimum value | |
| xMax | NUMERIC VAL | X-axis maximum value | |
| yMin | NUMERIC VAL | Y-axis minimum value | |
| yMax | NUMERIC VAL | Y-axis maximum value | |
| plotX | NUMERIC VAL | Plot area X origin | |
| plotY | NUMERIC VAL | Plot area Y origin | |
| plotWidth | NUMERIC VAL | Plot area width | |
| plotHeight | NUMERIC VAL | Plot area height |
TABLE Single-row table with @X and @Y
function 'DaxLib.SVG.Axes.Point' =
(
orientation: STRING,
axisIndex: NUMERIC VAL,
measureValue: NUMERIC VAL,
xMin: NUMERIC VAL,
xMax: NUMERIC VAL,
yMin: NUMERIC VAL,
yMax: NUMERIC VAL,
plotX: NUMERIC VAL,
plotY: NUMERIC VAL,
plotWidth: NUMERIC VAL,
plotHeight: NUMERIC VAL
) =>
VAR _Orientation = IF( orientation = "Horizontal", "Horizontal", "Vertical" )
VAR _AxisX = IF( xMax = xMin, plotX, DaxLib.SVG.Scale.Normalize( axisIndex, xMin, xMax, plotX, plotX + plotWidth ) )
VAR _AxisY = IF( xMax = xMin, plotY + plotHeight, DaxLib.SVG.Scale.Normalize( axisIndex, xMin, xMax, plotY + plotHeight, plotY ) )
VAR _ValueX = IF( yMax = yMin, plotX, DaxLib.SVG.Scale.Normalize( measureValue, yMin, yMax, plotX, plotX + plotWidth ) )
VAR _ValueY = IF( yMax = yMin, plotY + plotHeight, DaxLib.SVG.Scale.Normalize( measureValue, yMin, yMax, plotY + plotHeight, plotY ) )
RETURN
ROW(
"@X", IF( _Orientation = "Horizontal", _ValueX, _AxisX ),
"@Y", IF( _Orientation = "Horizontal", _AxisY, _ValueY )
)