Sets axis for x axis, y axis, and/or tool tip
Usage
setAxisFormat(
myIO,
xAxis = NULL,
yAxis = NULL,
toolTip = NULL,
xLabel = NULL,
yLabel = NULL
)Arguments
- myIO
an htmlwidget object created by the myIO() function
- xAxis
Optional string indicating a d3.js format for the x axis. When
NULL, leaves the existing setting unchanged.- yAxis
Optional string indicating a d3.js format for the y axis. When
NULL, leaves the existing setting unchanged.- toolTip
Optional string indicating a d3.js format for tooltips. When
NULL, leaves the existing setting unchanged.- xLabel
Optional string label for the x axis. When
NULL, leaves the existing setting unchanged.- yLabel
Optional string label for the y axis. When
NULL, leaves the existing setting unchanged.
Value
A modified myIO htmlwidget object with updated axis format
configuration. with options set for the tooltip formats
Examples
# Set axis formats using d3.js format strings
myIO() |> setAxisFormat(xAxis = ".0f", yAxis = ".1f")
# Set axis labels
myIO() |> setAxisFormat(xLabel = "Weight (lbs)", yLabel = "MPG")
# Label-only calls preserve previously configured formats
myIO() |> setAxisFormat(yAxis = ".2f") |> setAxisFormat(yLabel = "Rate")
