Axes.Baseline¶
Maps the numeric baseline to plot coordinates honoring orientation
| Parameter | Type | Required | Description |
|---|---|---|---|
| orientation | STRING | "Horizontal" or "Vertical" | |
| 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 @BaseX and @BaseY
function 'DaxLib.SVG.Axes.Baseline' =
(
orientation: STRING,
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 _BaseX = IF( yMax = yMin, plotX, DaxLib.SVG.Scale.Normalize( yMin, yMin, yMax, plotX, plotX + plotWidth ) )
VAR _BaseY = IF( yMax = yMin, plotY + plotHeight, DaxLib.SVG.Scale.Normalize( yMin, yMin, yMax, plotY + plotHeight, plotY ) )
RETURN
ROW(
"@BaseX", IF( _Orientation = "Horizontal", _BaseX, plotX ),
"@BaseY", IF( _Orientation = "Horizontal", plotY, _BaseY )
)