cjs_scale_cartesian.Rd
Common options to all cartesian axes. Namespace: options.scales[scaleId]
.
border
, grid
and ticks
are themselves lists of options. title
is
also a list of options in chartjs, but they those options are each a parameter
here.
cjs_scale_cartesian(
p,
id,
type = NULL,
alignToPixels = FALSE,
backgroundColor = NULL,
border = cjs_border(),
display = TRUE,
grid = cjs_grid(),
min = NULL,
max = NULL,
reverse = FALSE,
stacked = FALSE,
suggestedMax = NULL,
suggestedMin = NULL,
ticks = cjs_ticks(),
weight = 0,
bounds = "ticks",
position = NULL,
stack = NULL,
stackWeight = 1,
axis = NULL,
offset = FALSE,
title.text = "",
title.display = FALSE,
title.align = "center",
title.color = htmlwidgets::JS("Chart.defaults.color"),
title.font = htmlwidgets::JS("Chart.defaults.font"),
title.padding = 4
)
plot
axis id
string Type of scale being employed. Custom scales can be created and registered with a string key. This allows changing the type of an axis for a chart.
boolean FALSE Align pixel values to device pixels.
Color Background color of the scale area.
object Border configuration. See cjs_border()
boolean|string TRUE Controls the axis global visibility (visible when true, hidden when false). When display: 'auto', the axis is visible only if at least one associated dataset is visible.
object Grid line configuration. See cjs_grid()
number User defined minimum number for the scale, overrides minimum value from data. more...
number User defined maximum number for the scale, overrides maximum value from data. more...
boolean FALSE Reverse the scale.
boolean|string FALSE Should the data be stacked. more...
number Adjustment used when calculating the maximum data value. more...
number Adjustment used when calculating the minimum data value. more...
object Tick configuration. See cjs_ticks()
number 0 The weight used to sort the axis. Higher weights are further away from the chart area.
string 'ticks' Determines the scale bounds. more...
string | object Position of the axis. more...
string Stack group. Axes at the same position with same stack are stacked.
number 1 Weight of the scale in stack group. Used to determine the amount of allocated space for the scale within the group.
string Which type of axis this is. Possible values are: 'x', 'y'. If not set, this is inferred from the first character of the ID which should be 'x' or 'y'.
boolean FALSE If true, extra space is added to the both edges and the axis is scaled to fit into the chart area. This is set to true for a bar chart by default.
The text for the title. (i.e. "# of People" or "Response Choices").
boolean, if title.text is something other than "" then this will be automatically set to TRUE
Alignment of the axis title. Possible options are 'start', 'center' and 'end'
color of label, defaults to htmlwidgets::JS('Chart.defaults.color'),
color of the font, defaults to htmlwidgets::JS('Chart.defaults.font'),
Padding to apply around scale labels. Only top, bottom and y are implemented.
An object of class htmlwidget