You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' @param chart A chart created with [chartgpu()].
145
+
#' @param ... Options for x-axis,
146
+
#' see [https://github.com/ChartGPU/ChartGPU/blob/main/docs/api/options.md#axis-configuration](https://github.com/ChartGPU/ChartGPU/blob/main/docs/api/options.md#axis-configuration).
147
+
#'
148
+
#' @returns A [chartgpu()] `htmlwidget` object.
149
+
#' @export
150
+
#'
151
+
#' @example examples/chartgpu_axis_x.R
152
+
chartgpu_axis_x<-function(chart, ...) {
153
+
stopifnot("`chart` must have been created with `chartgpu()`"= inherits(chart, "chartgpu"))
154
+
chart$x$options$xAxis<- modifyList(
155
+
x=chart$x$options$xAxis %||% list(),
156
+
val= dropNulls(list(...))
157
+
)
158
+
return(chart)
159
+
}
160
+
161
+
162
+
#' Y-Axis Options
163
+
#'
164
+
#' @param chart A chart created with [chartgpu()].
165
+
#' @param ... Options for y-axis,
166
+
#' see [https://github.com/ChartGPU/ChartGPU/blob/main/docs/api/options.md#axis-configuration](https://github.com/ChartGPU/ChartGPU/blob/main/docs/api/options.md#axis-configuration).
167
+
#'
168
+
#' @returns A [chartgpu()] `htmlwidget` object.
169
+
#' @export
170
+
#'
171
+
#' @example examples/chartgpu_axis_y.R
172
+
chartgpu_axis_y<-function(chart, ...) {
173
+
stopifnot("`chart` must have been created with `chartgpu()`"= inherits(chart, "chartgpu"))
0 commit comments