main functions to use apex
This commit is contained in:
parent
b9d9b5a5e0
commit
c34718245b
22
NAMESPACE
22
NAMESPACE
|
@ -2,8 +2,30 @@
|
||||||
|
|
||||||
export(apexcharter)
|
export(apexcharter)
|
||||||
export(apexcharterOutput)
|
export(apexcharterOutput)
|
||||||
|
export(ax_annotations)
|
||||||
|
export(ax_chart)
|
||||||
|
export(ax_colors)
|
||||||
|
export(ax_dataLabels)
|
||||||
|
export(ax_fill)
|
||||||
|
export(ax_grid)
|
||||||
|
export(ax_labels)
|
||||||
|
export(ax_legend)
|
||||||
|
export(ax_markers)
|
||||||
|
export(ax_noData)
|
||||||
|
export(ax_plotOptions)
|
||||||
|
export(ax_responsive)
|
||||||
|
export(ax_series)
|
||||||
|
export(ax_states)
|
||||||
|
export(ax_stroke)
|
||||||
|
export(ax_subtitle)
|
||||||
|
export(ax_theme)
|
||||||
|
export(ax_title)
|
||||||
|
export(ax_tooltip)
|
||||||
|
export(ax_xaxis)
|
||||||
|
export(ax_yaxis)
|
||||||
export(renderApexcharter)
|
export(renderApexcharter)
|
||||||
importFrom(htmlwidgets,createWidget)
|
importFrom(htmlwidgets,createWidget)
|
||||||
importFrom(htmlwidgets,shinyRenderWidget)
|
importFrom(htmlwidgets,shinyRenderWidget)
|
||||||
importFrom(htmlwidgets,shinyWidgetOutput)
|
importFrom(htmlwidgets,shinyWidgetOutput)
|
||||||
importFrom(htmlwidgets,sizingPolicy)
|
importFrom(htmlwidgets,sizingPolicy)
|
||||||
|
importFrom(utils,modifyList)
|
||||||
|
|
|
@ -0,0 +1,633 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ApexCharts API ----------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#' Annotations properties
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param position
|
||||||
|
#' @param yaxis
|
||||||
|
#' @param xaxis
|
||||||
|
#' @param points
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_annotations <- function(ax,
|
||||||
|
position = NULL,
|
||||||
|
yaxis = NULL,
|
||||||
|
xaxis = NULL,
|
||||||
|
points = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "annotations", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Chart parameters
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param type Specify the chart type. Available Options: \code{"bar"}, \code{"column"}, \code{"line"},
|
||||||
|
#' \code{"histogram"}, \code{"pie"}, \code{"donut"}, \code{"radialBar"}, \code{"scatter"}, \code{"bubble"}, \code{"heatmap"}.
|
||||||
|
#' @param stacked Logical. Enables stacked option for axis charts.
|
||||||
|
#' @param stackType When stacked, should the stacking be percentage based or normal stacking. Available options: \code{"normal"} or \code{"100%"}
|
||||||
|
#' @param animations List.
|
||||||
|
#' @param background Background color for the chart area. If you want to set background with css, use \code{.apexcharts-canvas} to set it.
|
||||||
|
#' @param foreColor Sets the text color for the chart. Defaults to \code{#373d3f}.
|
||||||
|
#' @param dropShadow List.
|
||||||
|
#' @param events List.
|
||||||
|
#' @param offsetX
|
||||||
|
#' @param offsetY
|
||||||
|
#' @param scroller List.
|
||||||
|
#' @param selection List.
|
||||||
|
#' @param sparkline List. Sparkline hides all the elements of the charts other than the primary paths. Helps to visualize data in small areas. .
|
||||||
|
#' @param toolbar
|
||||||
|
#' @param zoom
|
||||||
|
#' @param width Width of the chart.
|
||||||
|
#' @param height Height of the chart.
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_chart <- function(ax,
|
||||||
|
type = NULL,
|
||||||
|
stacked = NULL,
|
||||||
|
stackType = NULL,
|
||||||
|
animations = NULL,
|
||||||
|
background = NULL,
|
||||||
|
foreColor = NULL,
|
||||||
|
dropShadow = NULL,
|
||||||
|
events = NULL,
|
||||||
|
offsetX = NULL,
|
||||||
|
offsetY = NULL,
|
||||||
|
scroller = NULL,
|
||||||
|
selection = NULL,
|
||||||
|
sparkline = NULL,
|
||||||
|
toolbar = NULL,
|
||||||
|
zoom = NULL,
|
||||||
|
width = NULL,
|
||||||
|
height = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "chart", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Specific options for chart
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param bar
|
||||||
|
#' @param heatmap
|
||||||
|
#' @param radialBar
|
||||||
|
#' @param pie
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_plotOptions <- function(ax,
|
||||||
|
bar = NULL,
|
||||||
|
heatmap = NULL,
|
||||||
|
radialBar = NULL,
|
||||||
|
pie = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "plotOptions", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Colors
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param ... Colors for the chart’s series. When all colors are used, it starts from the beginning.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_colors <- function(ax, ...) {
|
||||||
|
.ax_opt(ax, "colors", ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Labels on data
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param enabled
|
||||||
|
#' @param textAnchor
|
||||||
|
#' @param offsetX
|
||||||
|
#' @param offsetY
|
||||||
|
#' @param style
|
||||||
|
#' @param dropShadow
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_dataLabels <- function(ax,
|
||||||
|
enabled = NULL,
|
||||||
|
textAnchor = NULL,
|
||||||
|
offsetX = NULL,
|
||||||
|
offsetY = NULL,
|
||||||
|
style = NULL,
|
||||||
|
dropShadow = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "dataLabels", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Fill property
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param type
|
||||||
|
#' @param colors
|
||||||
|
#' @param opacity
|
||||||
|
#' @param gradient
|
||||||
|
#' @param image
|
||||||
|
#' @param pattern
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_fill <- function(ax,
|
||||||
|
type = NULL,
|
||||||
|
colors = NULL,
|
||||||
|
opacity = NULL,
|
||||||
|
gradient = NULL,
|
||||||
|
image = NULL,
|
||||||
|
pattern = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "fill", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Add grids on chart
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param show Logical. To show or hide grid area (including xaxis / yaxis)
|
||||||
|
#' @param borderColor Colors of grid borders / lines.
|
||||||
|
#' @param strokeDashArray Creates dashes in borders of svg path. Higher number creates more space between dashes in the border.
|
||||||
|
#' @param position Whether to place grid behind chart paths of in front. Available options for position: \code{"front"} or \code{"back"}
|
||||||
|
#' @param xaxis List.
|
||||||
|
#' @param yaxis List.
|
||||||
|
#' @param row List.
|
||||||
|
#' @param column List.
|
||||||
|
#' @param padding List.
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_grid <- function(ax,
|
||||||
|
show = NULL,
|
||||||
|
borderColor = NULL,
|
||||||
|
strokeDashArray = NULL,
|
||||||
|
position = NULL,
|
||||||
|
xaxis = NULL,
|
||||||
|
yaxis = NULL,
|
||||||
|
row = NULL,
|
||||||
|
column = NULL,
|
||||||
|
padding = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "grid", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Alternative axis labels
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param ...
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_labels <- function(ax, ...) {
|
||||||
|
.ax_opt(ax, "labels", ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Legend properties
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param show
|
||||||
|
#' @param floating
|
||||||
|
#' @param position
|
||||||
|
#' @param horizontalAlign
|
||||||
|
#' @param verticalAlign
|
||||||
|
#' @param fontSize
|
||||||
|
#' @param textAnchor
|
||||||
|
#' @param offsetY
|
||||||
|
#' @param offsetX
|
||||||
|
#' @param formatter
|
||||||
|
#' @param labels
|
||||||
|
#' @param markers
|
||||||
|
#' @param itemMargin
|
||||||
|
#' @param containerMargin
|
||||||
|
#' @param onItemClick
|
||||||
|
#' @param onItemHover
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_legend <- function(ax,
|
||||||
|
show = NULL,
|
||||||
|
floating = NULL,
|
||||||
|
position = NULL,
|
||||||
|
horizontFalAlign = NULL,
|
||||||
|
verticalAlign = NULL,
|
||||||
|
fontSize = NULL,
|
||||||
|
textAnchor = NULL,
|
||||||
|
offsetY = NULL,
|
||||||
|
offsetX = NULL,
|
||||||
|
formatter = NULL,
|
||||||
|
labels = NULL,
|
||||||
|
markers = NULL,
|
||||||
|
itemMargin = NULL,
|
||||||
|
containerMargin = NULL,
|
||||||
|
onItemClick = NULL,
|
||||||
|
onItemHover = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "legend", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Markers properties
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param discrete
|
||||||
|
#' @param size
|
||||||
|
#' @param colors
|
||||||
|
#' @param strokeColor
|
||||||
|
#' @param strokeWidth
|
||||||
|
#' @param strokeOpacity
|
||||||
|
#' @param fillOpacity
|
||||||
|
#' @param shape
|
||||||
|
#' @param radius
|
||||||
|
#' @param offsetX
|
||||||
|
#' @param offsetY
|
||||||
|
#' @param hover
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_markers <- function(ax,
|
||||||
|
discrete = NULL,
|
||||||
|
size = NULL,
|
||||||
|
colors = NULL,
|
||||||
|
strokeColor = NULL,
|
||||||
|
strokeWidth = NULL,
|
||||||
|
strokeOpacity = NULL,
|
||||||
|
fillOpacity = NULL,
|
||||||
|
shape = NULL,
|
||||||
|
radius = NULL,
|
||||||
|
offsetX = NULL,
|
||||||
|
offsetY = NULL,
|
||||||
|
hover = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "markers", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' No data specification
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param text
|
||||||
|
#' @param align
|
||||||
|
#' @param verticalAlign
|
||||||
|
#' @param offsetX
|
||||||
|
#' @param offsetY
|
||||||
|
#' @param style
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_noData <- function(ax,
|
||||||
|
text = NULL,
|
||||||
|
align = NULL,
|
||||||
|
verticalAlign = NULL,
|
||||||
|
offsetX = NULL,
|
||||||
|
offsetY = NULL,
|
||||||
|
style = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "noData", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Responsive options
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param ...
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_responsive <- function(ax, ...) {
|
||||||
|
.ax_opt(ax, "responsive", ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Add data to a chart
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_series <- function(ax, ...) {
|
||||||
|
.ax_opt(ax, "series", ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Charts' states
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param normal
|
||||||
|
#' @param hover
|
||||||
|
#' @param active
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_states <- function(ax,
|
||||||
|
normal = NULL,
|
||||||
|
hover = NULL,
|
||||||
|
active = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "states", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Chart's title
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param text
|
||||||
|
#' @param align
|
||||||
|
#' @param margin
|
||||||
|
#' @param offsetX
|
||||||
|
#' @param offsetY
|
||||||
|
#' @param floating
|
||||||
|
#' @param style
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_title <- function(ax,
|
||||||
|
text = NULL,
|
||||||
|
align = NULL,
|
||||||
|
margin = NULL,
|
||||||
|
offsetX = NULL,
|
||||||
|
offsetY = NULL,
|
||||||
|
floating = NULL,
|
||||||
|
style = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "title", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Chart's subtitle
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param text Text to display as a subtitle of chart.
|
||||||
|
#' @param align Alignment of subtitle relative to chart area. Possible Options: \code{"left"}, \code{"center"} and \code{"right"}.
|
||||||
|
#' @param margin Numeric. Vertical spacing around the subtitle text.
|
||||||
|
#' @param offsetX Numeric. Sets the left offset for subtitle text.
|
||||||
|
#' @param offsetY Numeric. Sets the top offset for subtitle text
|
||||||
|
#' @param floating Logical. The floating option will take out the subtitle text from the chart area and make it float on top of the chart.
|
||||||
|
#' @param style List.
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_subtitle <- function(ax,
|
||||||
|
text = NULL,
|
||||||
|
align = NULL,
|
||||||
|
margin = NULL,
|
||||||
|
offsetX = NULL,
|
||||||
|
offsetY = NULL,
|
||||||
|
floating = NULL,
|
||||||
|
style = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "subtitle", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Stroke properties
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param show Logical. To show or hide path-stroke / line
|
||||||
|
#' @param curve In line / area charts, whether to draw smooth lines or straight lines.
|
||||||
|
#' Available Options: \code{"smooth"} (connects the points in a curve fashion. Also known as spline)
|
||||||
|
#' and \code{"straight"} (connect the points in straight lines.).
|
||||||
|
#' @param lineCap For setting the starting and ending points of stroke. Available Options:
|
||||||
|
#' \code{"butt"} (ends the stroke with a 90-degree angle), \code{"square"}
|
||||||
|
#' (similar to butt except that it extends the stroke beyond the length of the path)
|
||||||
|
#' and \code{"round"} (ends the path-stroke with a radius that smooths out the start and end points)
|
||||||
|
#' @param width Sets the width of border for svg path.
|
||||||
|
#' @param colors Colors to fill the border for paths.
|
||||||
|
#' @param dashArray Creates dashes in borders of svg path. Higher number creates more space between dashes in the border.
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_stroke <- function(ax,
|
||||||
|
show = NULL,
|
||||||
|
curve = NULL,
|
||||||
|
lineCap = NULL,
|
||||||
|
width = NULL,
|
||||||
|
colors = NULL,
|
||||||
|
dashArray = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "stroke", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Tooltip options
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param enabled Logical. Show tooltip when user hovers over chart area.
|
||||||
|
#' @param shared Logical. When having multiple series, show a shared tooltip.
|
||||||
|
#' @param followCursor Logical. Follow user’s cursor position instead of putting tooltip on actual data points.
|
||||||
|
#' @param intersect Logical. Show tooltip only when user hovers exactly over datapoint.
|
||||||
|
#' @param inverseOrder Logical. In multiple series, when having shared tooltip, inverse the order of series (for better comparison in stacked charts).
|
||||||
|
#' @param custom JS function. Draw a custom html tooltip instead of the default one based on the values provided in the function arguments.
|
||||||
|
#' @param fillSeriesColor Logical. When enabled, fill the tooltip background with the corresponding series color.
|
||||||
|
#' @param onDatasetHover List.
|
||||||
|
#' @param theme List.
|
||||||
|
#' @param x List.
|
||||||
|
#' @param y List.
|
||||||
|
#' @param z List.
|
||||||
|
#' @param marker List.
|
||||||
|
#' @param items List.
|
||||||
|
#' @param fixed List.
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_tooltip <- function(ax,
|
||||||
|
enabled = NULL,
|
||||||
|
shared = NULL,
|
||||||
|
followCursor = NULL,
|
||||||
|
intersect = NULL,
|
||||||
|
inverseOrder = NULL,
|
||||||
|
custom = NULL,
|
||||||
|
fillSeriesColor = NULL,
|
||||||
|
onDatasetHover = NULL,
|
||||||
|
theme = NULL,
|
||||||
|
x = NULL,
|
||||||
|
y = NULL,
|
||||||
|
z = NULL,
|
||||||
|
marker = NULL,
|
||||||
|
items = NULL,
|
||||||
|
fixed = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "tooltip", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' X-axis options
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param type Character. Available Options : \code{"categories"} and \code{"datetime"}.
|
||||||
|
#' @param categories Categories are labels which are displayed on the x-axis.
|
||||||
|
#' @param labels List.
|
||||||
|
#' @param axisBorder List.
|
||||||
|
#' @param axisTicks List.
|
||||||
|
#' @param tickAmount Number of Tick Intervals to show.
|
||||||
|
#' @param min Lowest number to be set for the x-axis. The graph drawing beyond this number will be clipped off.
|
||||||
|
#' @param max Highest number to be set for the x-axis. The graph drawing beyond this number will be clipped off.
|
||||||
|
#' @param range Range takes the max value of x-axis, subtracts the provided range value and gets the min value based on that.
|
||||||
|
#' So, technically it helps to keep the same range when min and max values gets updated dynamically.
|
||||||
|
#' @param floating Logical. Floating takes x-axis is taken out of normal flow and places x-axis on svg element directly,
|
||||||
|
#' similar to an absolutely positioned element. Set the offsetX and offsetY then to adjust the position manually
|
||||||
|
#' @param position Setting this option allows you to change the x-axis position. Available options: \code{"top"} and \code{"bottom"}.
|
||||||
|
#' @param title List.
|
||||||
|
#' @param crosshairs List.
|
||||||
|
#' @param tooltip List.
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_xaxis <- function(ax,
|
||||||
|
type = NULL,
|
||||||
|
categories = NULL,
|
||||||
|
labels = NULL,
|
||||||
|
axisBorder = NULL,
|
||||||
|
axisTicks = NULL,
|
||||||
|
tickAmount = NULL,
|
||||||
|
min = NULL,
|
||||||
|
max = NULL,
|
||||||
|
range = NULL,
|
||||||
|
floating = NULL,
|
||||||
|
position = NULL,
|
||||||
|
title = NULL,
|
||||||
|
crosshairs = NULL,
|
||||||
|
tooltip = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "xaxis", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Y-axis options
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param opposite Logical. When enabled, will draw the yaxis on the right side of the chart.
|
||||||
|
#' @param tickAmount Number of Tick Intervals to show.
|
||||||
|
#' @param max Lowest number to be set for the y-axis. The graph drawing beyond this number will be clipped off.
|
||||||
|
#' @param min Highest number to be set for the y-axis. The graph drawing beyond this number will be clipped off.
|
||||||
|
#' @param floating Logical. Floating takes y-axis is taken out of normal flow and places y-axis on svg element directly,
|
||||||
|
#' similar to an absolutely positioned element. Set the offsetX and offsetY then to adjust the position manually
|
||||||
|
#' @param labels List.
|
||||||
|
#' @param axisBorder List.
|
||||||
|
#' @param axisTicks List.
|
||||||
|
#' @param title List.
|
||||||
|
#' @param tooltip List.
|
||||||
|
#' @param crosshairs List.
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_yaxis <- function(ax,
|
||||||
|
opposite = NULL,
|
||||||
|
tickAmount = NULL,
|
||||||
|
max = NULL,
|
||||||
|
min = NULL,
|
||||||
|
floating = NULL,
|
||||||
|
labels = NULL,
|
||||||
|
axisBorder = NULL,
|
||||||
|
axisTicks = NULL,
|
||||||
|
title = NULL,
|
||||||
|
tooltip = NULL,
|
||||||
|
crosshairs = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "yaxis", l = dropNulls(params))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Theme for charts
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @param palette Character. Available palettes: \code{"palette1"} to \code{"palette10"}.
|
||||||
|
#' @param monochrome List.
|
||||||
|
#' @param ... Additional parameters.
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
#' @export
|
||||||
|
#'
|
||||||
|
#' @examples
|
||||||
|
ax_theme <- function(ax,
|
||||||
|
palette = NULL,
|
||||||
|
monochrome = NULL,
|
||||||
|
...) {
|
||||||
|
params <- c(as.list(environment()), list(...))[-1]
|
||||||
|
.ax_opt2(ax, "theme", l = dropNulls(params))
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
|
||||||
|
|
||||||
|
# dropNulls
|
||||||
|
dropNulls <- function(x) {
|
||||||
|
x[!vapply(x, is.null, FUN.VALUE = logical(1))]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
`%||%` <- function(x, y) {
|
||||||
|
if (!is.null(x)) x else y
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#' Utility function to create ApexChart parameters JSON
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexchart} \code{htmlwidget} object.
|
||||||
|
#' @param name Slot's name to edit
|
||||||
|
#' @param ... Arguments for the slot
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexchart} \code{htmlwidget} object.
|
||||||
|
#'
|
||||||
|
#' @importFrom utils modifyList
|
||||||
|
#'
|
||||||
|
#' @noRd
|
||||||
|
.ax_opt <- function(ax, name, ...) {
|
||||||
|
|
||||||
|
if(!any(class(ax) %in% c("apexcharter", "apexcharter_Proxy"))){
|
||||||
|
stop("ax must be a apexcharter or a apexcharterProxy object")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is.null(ax$x$ax_opts[[name]])) {
|
||||||
|
ax$x$ax_opts[[name]] <- list(...)
|
||||||
|
} else {
|
||||||
|
ax$x$ax_opts[[name]] <- utils::modifyList(x = ax$x$ax_opts[[name]], val = list(...), keep.null = TRUE)
|
||||||
|
}
|
||||||
|
|
||||||
|
return(ax)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' Utility function to create ApexChart parameters JSON
|
||||||
|
#'
|
||||||
|
#' @param ax A \code{apexchart} \code{htmlwidget} object.
|
||||||
|
#' @param name Slot's name to edit
|
||||||
|
#' @param l List of arguments for the slot
|
||||||
|
#'
|
||||||
|
#' @return A \code{apexchart} \code{htmlwidget} object.
|
||||||
|
#'
|
||||||
|
#' @noRd
|
||||||
|
.ax_opt2 <- function(ax, name, l) {
|
||||||
|
|
||||||
|
if (is.null(ax$x$ax_opts[[name]])) {
|
||||||
|
ax$x$ax_opts[[name]] <- l
|
||||||
|
} else {
|
||||||
|
ax$x$ax_opts[[name]] <- utils::modifyList(x = ax$x$ax_opts[[name]], val = l, keep.null = TRUE)
|
||||||
|
}
|
||||||
|
|
||||||
|
return(ax)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Parsing options ---------------------------------------------------------
|
||||||
|
|
||||||
|
cx <- V8::v8()
|
||||||
|
cx$source(file = "inst/htmlwidgets/lib/apexcharts-1.0.4/Options.js")
|
||||||
|
ApexOpts <- cx$get("Options")
|
||||||
|
|
||||||
|
names(ApexOpts)
|
||||||
|
str(ApexOpts$chart, max.level = 1)
|
||||||
|
str(ApexOpts$chart$animations, max.level = 1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Utils -------------------------------------------------------------------
|
||||||
|
|
||||||
|
make_fun <- function(opts, name, file = "") {
|
||||||
|
args <- names(opts[[name]])
|
||||||
|
if (is.null(args)) {
|
||||||
|
args <- "..."
|
||||||
|
} else {
|
||||||
|
args <- sprintf("%s = NULL", args)
|
||||||
|
args <- paste(args, collapse = ",\n")
|
||||||
|
args <- paste0(args, ", ...")
|
||||||
|
}
|
||||||
|
body <- paste(
|
||||||
|
"\nparams <- c(as.list(environment()), list(...))[-1]",
|
||||||
|
paste0(".ax_opt2(ax, \"", name, "\", l = dropNulls(params))\n"),
|
||||||
|
sep = "\n"
|
||||||
|
)
|
||||||
|
res <- paste0("ax_", name, " <- function(ax, ", args, ") {", body, "}\n\n\n")
|
||||||
|
cat(res, file = file, append = TRUE)
|
||||||
|
return(invisible(res))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# chart -------------------------------------------------------------------
|
||||||
|
|
||||||
|
make_fun(ApexOpts, "chart")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# plotOptions -------------------------------------------------------------
|
||||||
|
|
||||||
|
make_fun(ApexOpts, "plotOptions")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ALL ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
lapply(
|
||||||
|
X = names(ApexOpts),
|
||||||
|
FUN = make_fun, opts = ApexOpts, file = "R/apex-utils.R"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: apexcharts
|
- name: apexcharts
|
||||||
version: 1.0.4
|
version: 1.1.0
|
||||||
src: htmlwidgets/lib/apexcharts-1.0.4
|
src: htmlwidgets/lib/apexcharts-1.1.0
|
||||||
script: apexcharts.min.js
|
script: apexcharts.min.js
|
||||||
|
|
|
@ -0,0 +1,759 @@
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ApexCharts Options for setting the initial configuration of ApexCharts.
|
||||||
|
**/
|
||||||
|
|
||||||
|
var xAxisAnnotation = {
|
||||||
|
x: 0,
|
||||||
|
strokeDashArray: 4,
|
||||||
|
borderColor: '#c2c2c2',
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
label: {
|
||||||
|
borderColor: '#c2c2c2',
|
||||||
|
borderWidth: 1,
|
||||||
|
text: "undefined",
|
||||||
|
textAnchor: 'middle',
|
||||||
|
orientation: 'vertical',
|
||||||
|
position: 'top',
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
style: {
|
||||||
|
background: '#fff',
|
||||||
|
color: '#777',
|
||||||
|
fontSize: '12px',
|
||||||
|
cssClass: 'apexcharts-xaxis-annotation-label',
|
||||||
|
padding: {
|
||||||
|
left: 5,
|
||||||
|
right: 5,
|
||||||
|
top: 2,
|
||||||
|
bottom: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var pointAnnotation = {
|
||||||
|
x: 0,
|
||||||
|
y: null,
|
||||||
|
yAxisIndex: 0,
|
||||||
|
seriesIndex: 0,
|
||||||
|
marker: {
|
||||||
|
size: 0,
|
||||||
|
fillColor: '#fff',
|
||||||
|
strokeWidth: 2,
|
||||||
|
strokeColor: '#333',
|
||||||
|
shape: 'circle',
|
||||||
|
radius: 2
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
borderColor: '#c2c2c2',
|
||||||
|
borderWidth: 1,
|
||||||
|
text: "undefined",
|
||||||
|
textAnchor: 'middle',
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: -15,
|
||||||
|
style: {
|
||||||
|
background: '#fff',
|
||||||
|
color: '#777',
|
||||||
|
fontSize: '12px',
|
||||||
|
cssClass: 'apexcharts-point-annotation-label',
|
||||||
|
padding: {
|
||||||
|
left: 5,
|
||||||
|
right: 5,
|
||||||
|
top: 0,
|
||||||
|
bottom: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var yAxisAnnotation = {
|
||||||
|
y: 0,
|
||||||
|
strokeDashArray: 4,
|
||||||
|
borderColor: '#c2c2c2',
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
yAxisIndex: 0,
|
||||||
|
label: {
|
||||||
|
borderColor: '#c2c2c2',
|
||||||
|
borderWidth: 1,
|
||||||
|
text: "undefined",
|
||||||
|
textAnchor: 'end',
|
||||||
|
position: 'right',
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: -3,
|
||||||
|
style: {
|
||||||
|
background: '#fff',
|
||||||
|
color: '#777',
|
||||||
|
fontSize: '12px',
|
||||||
|
cssClass: 'apexcharts-yaxis-annotation-label',
|
||||||
|
padding: {
|
||||||
|
left: 5,
|
||||||
|
right: 5,
|
||||||
|
top: 0,
|
||||||
|
bottom: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var yAxis = {
|
||||||
|
opposite: false,
|
||||||
|
tickAmount: 6,
|
||||||
|
max: "undefined",
|
||||||
|
min: "undefined",
|
||||||
|
floating: false,
|
||||||
|
labels: {
|
||||||
|
show: true,
|
||||||
|
maxWidth: 160,
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
style: {
|
||||||
|
colors: [],
|
||||||
|
fontSize: '12px',
|
||||||
|
cssClass: 'apexcharts-yaxis-label'
|
||||||
|
},
|
||||||
|
formatter: function (val) {
|
||||||
|
if (typeof val === 'number') {
|
||||||
|
return val ? val.toFixed(0) : val
|
||||||
|
}
|
||||||
|
return val
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisBorder: {
|
||||||
|
show: false,
|
||||||
|
color: '#78909C',
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0
|
||||||
|
},
|
||||||
|
axisTicks: {
|
||||||
|
show: false,
|
||||||
|
color: '#78909C',
|
||||||
|
width: 6,
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
text: "undefined",
|
||||||
|
rotate: -90,
|
||||||
|
offsetY: 0,
|
||||||
|
offsetX: 0,
|
||||||
|
style: {
|
||||||
|
color: "undefined",
|
||||||
|
fontSize: '12px',
|
||||||
|
cssClass: 'apexcharts-yaxis-title'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
enabled: false,
|
||||||
|
offsetX: 0
|
||||||
|
},
|
||||||
|
crosshairs: {
|
||||||
|
show: true,
|
||||||
|
position: 'front',
|
||||||
|
stroke: {
|
||||||
|
color: '#b6b6b6',
|
||||||
|
width: 1,
|
||||||
|
dashArray: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var Options = {
|
||||||
|
//init () {
|
||||||
|
// return {
|
||||||
|
annotations: {
|
||||||
|
position: 'front',
|
||||||
|
yaxis: [yAxisAnnotation],
|
||||||
|
xaxis: [xAxisAnnotation],
|
||||||
|
points: [pointAnnotation]
|
||||||
|
},
|
||||||
|
chart: {
|
||||||
|
animations: {
|
||||||
|
enabled: true,
|
||||||
|
easing: 'easeinout', // linear, easeout, easein, easeinout
|
||||||
|
speed: 800,
|
||||||
|
animateGradually: {
|
||||||
|
delay: 150,
|
||||||
|
enabled: true
|
||||||
|
},
|
||||||
|
dynamicAnimation: {
|
||||||
|
enabled: true,
|
||||||
|
speed: 350
|
||||||
|
}
|
||||||
|
},
|
||||||
|
background: 'transparent',
|
||||||
|
foreColor: '#373d3f',
|
||||||
|
dropShadow: {
|
||||||
|
enabled: false,
|
||||||
|
enabledSeries: "undefined",
|
||||||
|
top: 2,
|
||||||
|
left: 2,
|
||||||
|
blur: 4,
|
||||||
|
opacity: 0.35
|
||||||
|
},
|
||||||
|
events: {
|
||||||
|
beforeMount: "undefined",
|
||||||
|
mounted: "undefined",
|
||||||
|
updated: "undefined",
|
||||||
|
clicked: "undefined",
|
||||||
|
selection: "undefined",
|
||||||
|
dataPointSelection: "undefined",
|
||||||
|
zoomed: "undefined",
|
||||||
|
scrolled: "undefined"
|
||||||
|
},
|
||||||
|
height: 'auto',
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
scroller: {
|
||||||
|
enabled: false,
|
||||||
|
height: 30,
|
||||||
|
track: {
|
||||||
|
height: 2,
|
||||||
|
background: '#e0e0e0'
|
||||||
|
},
|
||||||
|
thumb: {
|
||||||
|
height: 2,
|
||||||
|
background: '#008FFB'
|
||||||
|
},
|
||||||
|
scrollButtons: {
|
||||||
|
enabled: true,
|
||||||
|
size: 6,
|
||||||
|
borderWidth: 2,
|
||||||
|
borderColor: '#c3c3c3',
|
||||||
|
fillColor: '#fff'
|
||||||
|
},
|
||||||
|
padding: {
|
||||||
|
left: 10,
|
||||||
|
right: 10
|
||||||
|
},
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0
|
||||||
|
},
|
||||||
|
selection: {
|
||||||
|
enabled: true,
|
||||||
|
type: 'x',
|
||||||
|
selectedPoints: "undefined",
|
||||||
|
fill: {
|
||||||
|
color: '#24292e',
|
||||||
|
opacity: 0.1
|
||||||
|
},
|
||||||
|
stroke: {
|
||||||
|
width: 1,
|
||||||
|
color: '#24292e',
|
||||||
|
opacity: 0.4,
|
||||||
|
dashArray: 3
|
||||||
|
},
|
||||||
|
xaxis: {
|
||||||
|
min: "undefined",
|
||||||
|
max: "undefined"
|
||||||
|
},
|
||||||
|
yaxis: {
|
||||||
|
min: "undefined",
|
||||||
|
max: "undefined"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sparkline: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
stacked: false,
|
||||||
|
stackType: 'normal',
|
||||||
|
toolbar: {
|
||||||
|
show: true,
|
||||||
|
tools: {
|
||||||
|
download: true,
|
||||||
|
selection: true,
|
||||||
|
zoom: true,
|
||||||
|
zoomin: true,
|
||||||
|
zoomout: true,
|
||||||
|
pan: true,
|
||||||
|
reset: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
type: 'line',
|
||||||
|
width: '100%',
|
||||||
|
zoom: {
|
||||||
|
enabled: true,
|
||||||
|
type: 'x',
|
||||||
|
zoomedArea: {
|
||||||
|
fill: {
|
||||||
|
color: '#90CAF9',
|
||||||
|
opacity: 0.4
|
||||||
|
},
|
||||||
|
stroke: {
|
||||||
|
color: '#0D47A1',
|
||||||
|
opacity: 0.4,
|
||||||
|
width: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
plotOptions: {
|
||||||
|
bar: {
|
||||||
|
horizontal: false,
|
||||||
|
endingShape: 'flat',
|
||||||
|
columnWidth: '70%', // should be in percent 0 - 100
|
||||||
|
barHeight: '70%', // should be in percent 0 - 100
|
||||||
|
distributed: false,
|
||||||
|
colors: {
|
||||||
|
ranges: [],
|
||||||
|
backgroundBarColors: [],
|
||||||
|
backgroundBarOpacity: 1
|
||||||
|
},
|
||||||
|
dataLabels: {
|
||||||
|
position: 'top' // top, center, bottom
|
||||||
|
}
|
||||||
|
// stackedLabels: true
|
||||||
|
},
|
||||||
|
heatmap: {
|
||||||
|
radius: 2,
|
||||||
|
enableShades: true,
|
||||||
|
shadeIntensity: 0.5,
|
||||||
|
colorScale: {
|
||||||
|
ranges: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
radialBar: {
|
||||||
|
size: "undefined",
|
||||||
|
inverseOrder: false,
|
||||||
|
startAngle: 0,
|
||||||
|
endAngle: 360,
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
hollow: {
|
||||||
|
margin: 5,
|
||||||
|
size: '50%',
|
||||||
|
background: 'transparent',
|
||||||
|
image: "undefined",
|
||||||
|
imageWidth: 150,
|
||||||
|
imageHeight: 150,
|
||||||
|
imageOffsetX: 0,
|
||||||
|
imageOffsetY: 0,
|
||||||
|
imageClipped: true,
|
||||||
|
position: 'front',
|
||||||
|
dropShadow: {
|
||||||
|
enabled: false,
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
blur: 3,
|
||||||
|
opacity: 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
track: {
|
||||||
|
show: true,
|
||||||
|
startAngle: "undefined",
|
||||||
|
endAngle: "undefined",
|
||||||
|
background: '#f2f2f2',
|
||||||
|
strokeWidth: '97%',
|
||||||
|
opacity: 1,
|
||||||
|
margin: 5, // margin is in pixels
|
||||||
|
dropShadow: {
|
||||||
|
enabled: false,
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
blur: 3,
|
||||||
|
opacity: 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dataLabels: {
|
||||||
|
showOn: 'always', // hover/always
|
||||||
|
name: {
|
||||||
|
show: true,
|
||||||
|
fontSize: '22px',
|
||||||
|
color: "undefined",
|
||||||
|
offsetY: -10
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
show: true,
|
||||||
|
fontSize: '16px',
|
||||||
|
color: "undefined",
|
||||||
|
offsetY: 16,
|
||||||
|
formatter: function (val) {
|
||||||
|
return val + '%'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pie: {
|
||||||
|
size: "undefined",
|
||||||
|
donut: {
|
||||||
|
size: '65%',
|
||||||
|
background: 'transparent'
|
||||||
|
// TODO: draw labels in donut area
|
||||||
|
// labels: {
|
||||||
|
// showOn: 'hover',
|
||||||
|
// name: {
|
||||||
|
// show: false,
|
||||||
|
// fontSize: '22px',
|
||||||
|
// color: "undefined",
|
||||||
|
// offsetY: -10
|
||||||
|
// },
|
||||||
|
// value: {
|
||||||
|
// show: true,
|
||||||
|
// offsetY: 16,
|
||||||
|
// fontSize: '16px',
|
||||||
|
// color: "undefined",
|
||||||
|
// formatter: function (val) {
|
||||||
|
// return val + '%'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
customScale: 0,
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
dataLabels: {
|
||||||
|
offset: 0 // offset by which labels will move outside
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
colors: "undefined",
|
||||||
|
dataLabels: {
|
||||||
|
enabled: true,
|
||||||
|
formatter: function (val) {
|
||||||
|
return val
|
||||||
|
},
|
||||||
|
textAnchor: 'middle',
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
style: {
|
||||||
|
fontSize: '14px',
|
||||||
|
colors: "undefined"
|
||||||
|
},
|
||||||
|
dropShadow: {
|
||||||
|
enabled: false,
|
||||||
|
top: 1,
|
||||||
|
left: 1,
|
||||||
|
blur: 1,
|
||||||
|
opacity: 0.45
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
type: 'solid',
|
||||||
|
colors: "undefined", // array of colors,
|
||||||
|
opacity: 0.9,
|
||||||
|
gradient: {
|
||||||
|
shade: 'dark',
|
||||||
|
type: 'horizontal',
|
||||||
|
shadeIntensity: 0.5,
|
||||||
|
gradientToColors: "undefined",
|
||||||
|
inverseColors: true,
|
||||||
|
opacityFrom: 1,
|
||||||
|
opacityTo: 1,
|
||||||
|
stops: [0, 50, 100]
|
||||||
|
},
|
||||||
|
image: {
|
||||||
|
src: [],
|
||||||
|
width: "undefined", // optional
|
||||||
|
height: "undefined" // optional
|
||||||
|
},
|
||||||
|
pattern: {
|
||||||
|
style: 'sqaures', // string or array of strings
|
||||||
|
width: 6,
|
||||||
|
height: 6,
|
||||||
|
strokeWidth: 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
show: true,
|
||||||
|
borderColor: '#e0e0e0',
|
||||||
|
strokeDashArray: 0,
|
||||||
|
position: 'back',
|
||||||
|
xaxis: {
|
||||||
|
lines: {
|
||||||
|
show: false,
|
||||||
|
animate: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
yaxis: {
|
||||||
|
lines: {
|
||||||
|
show: true,
|
||||||
|
animate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
row: {
|
||||||
|
colors: "undefined", // takes as array which will be repeated on rows
|
||||||
|
opacity: 0.5
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
colors: "undefined", // takes an array which will be repeated on columns
|
||||||
|
opacity: 0.5
|
||||||
|
},
|
||||||
|
padding: {
|
||||||
|
top: 0,
|
||||||
|
right: 10,
|
||||||
|
bottom: 0,
|
||||||
|
left: 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
labels: [],
|
||||||
|
legend: {
|
||||||
|
show: true,
|
||||||
|
floating: false,
|
||||||
|
position: 'bottom', // whether to position legends in 1 of 4
|
||||||
|
// direction - top, bottom, left, right
|
||||||
|
horizontalAlign: 'center', // when position top/bottom, you can
|
||||||
|
// specify whether to align legends
|
||||||
|
// left, right or center
|
||||||
|
verticalAlign: 'middle',
|
||||||
|
fontSize: '14px',
|
||||||
|
textAnchor: 'start',
|
||||||
|
offsetY: 0,
|
||||||
|
offsetX: 0,
|
||||||
|
formatter: "undefined",
|
||||||
|
labels: {
|
||||||
|
color: "undefined",
|
||||||
|
useSeriesColors: false
|
||||||
|
},
|
||||||
|
markers: {
|
||||||
|
size: 6,
|
||||||
|
strokeWidth: 0,
|
||||||
|
strokeColor: '#fff',
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
shape: 'circle',
|
||||||
|
radius: 2
|
||||||
|
},
|
||||||
|
itemMargin: {
|
||||||
|
horizontal: 20,
|
||||||
|
vertical: 5
|
||||||
|
},
|
||||||
|
containerMargin: {
|
||||||
|
left: 5,
|
||||||
|
top: 4,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0
|
||||||
|
},
|
||||||
|
onItemClick: {
|
||||||
|
toggleDataSeries: true
|
||||||
|
},
|
||||||
|
onItemHover: {
|
||||||
|
highlightDataSeries: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
markers: {
|
||||||
|
discrete: [],
|
||||||
|
size: 0,
|
||||||
|
colors: "undefined",
|
||||||
|
strokeColor: '#fff',
|
||||||
|
strokeWidth: 2,
|
||||||
|
strokeOpacity: 0.9,
|
||||||
|
fillOpacity: 1,
|
||||||
|
shape: 'circle',
|
||||||
|
radius: 2,
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
hover: {
|
||||||
|
size: 6
|
||||||
|
}
|
||||||
|
},
|
||||||
|
noData: {
|
||||||
|
text: "undefined",
|
||||||
|
align: 'center',
|
||||||
|
verticalAlign: 'middle',
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
style: {
|
||||||
|
color: '#888',
|
||||||
|
fontSize: '16px'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
responsive: [], // breakpoints should follow ascending order 400, then 700, then 1000
|
||||||
|
series: "undefined",
|
||||||
|
states: {
|
||||||
|
normal: {
|
||||||
|
filter: {
|
||||||
|
type: 'none',
|
||||||
|
value: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hover: {
|
||||||
|
filter: {
|
||||||
|
type: 'lighten',
|
||||||
|
value: 0.15
|
||||||
|
}
|
||||||
|
},
|
||||||
|
active: {
|
||||||
|
allowMultipleDataPointsSelection: false,
|
||||||
|
filter: {
|
||||||
|
type: 'darken',
|
||||||
|
value: 0.35
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
text: "undefined",
|
||||||
|
align: 'left',
|
||||||
|
margin: 10,
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
floating: false,
|
||||||
|
style: {
|
||||||
|
fontSize: '16px',
|
||||||
|
color: '#263238'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
subtitle: {
|
||||||
|
text: "undefined",
|
||||||
|
align: 'left',
|
||||||
|
margin: 10,
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
floating: false,
|
||||||
|
style: {
|
||||||
|
fontSize: '14px',
|
||||||
|
color: '#9699a2'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
stroke: {
|
||||||
|
show: true,
|
||||||
|
curve: 'smooth', // "smooth" or "straight"
|
||||||
|
lineCap: 'butt', // round, butt , square
|
||||||
|
width: 2,
|
||||||
|
colors: "undefined", // array of colors
|
||||||
|
dashArray: 0 // single value or array of values
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
enabled: true,
|
||||||
|
shared: true,
|
||||||
|
followCursor: false, // when disabled, the tooltip will show on top of the series instead of mouse position
|
||||||
|
intersect: false, // when enabled, tooltip will only show when user directly hovers over point
|
||||||
|
inverseOrder: false,
|
||||||
|
custom: "undefined",
|
||||||
|
fillSeriesColor: false,
|
||||||
|
onDatasetHover: {
|
||||||
|
highlightDataSeries: false
|
||||||
|
},
|
||||||
|
theme: 'light',
|
||||||
|
x: { // x value
|
||||||
|
show: true,
|
||||||
|
format: 'dd MMM', // dd/MM, dd MMM yy, dd MMM yyyy
|
||||||
|
formatter: "undefined" // a custom user supplied formatter function
|
||||||
|
},
|
||||||
|
y: {
|
||||||
|
formatter: "undefined",
|
||||||
|
title: {
|
||||||
|
formatter: function (seriesName) {
|
||||||
|
return seriesName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
z: {
|
||||||
|
formatter: "undefined",
|
||||||
|
title: 'Size: '
|
||||||
|
},
|
||||||
|
marker: {
|
||||||
|
show: true
|
||||||
|
},
|
||||||
|
items: {
|
||||||
|
display: 'flex'
|
||||||
|
},
|
||||||
|
fixed: {
|
||||||
|
enabled: false,
|
||||||
|
position: 'topRight', // topRight, topLeft, bottomRight, bottomLeft
|
||||||
|
offsetX: -100,
|
||||||
|
offsetY: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xaxis: {
|
||||||
|
type: 'category',
|
||||||
|
categories: [],
|
||||||
|
labels: {
|
||||||
|
show: true,
|
||||||
|
rotate: -45,
|
||||||
|
rotateAlways: false,
|
||||||
|
trim: true,
|
||||||
|
maxHeight: 120,
|
||||||
|
style: {
|
||||||
|
colors: [],
|
||||||
|
fontSize: '12px',
|
||||||
|
cssClass: 'apexcharts-xaxis-label'
|
||||||
|
},
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
format: "undefined",
|
||||||
|
formatter: "undefined", // custom formatter function which will override format
|
||||||
|
datetimeFormatter: {
|
||||||
|
year: 'yyyy',
|
||||||
|
month: 'MMM \'yy',
|
||||||
|
day: 'dd MMM',
|
||||||
|
hour: 'HH:mm'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisBorder: {
|
||||||
|
show: true,
|
||||||
|
color: '#78909C',
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0
|
||||||
|
},
|
||||||
|
axisTicks: {
|
||||||
|
show: true,
|
||||||
|
color: '#78909C',
|
||||||
|
height: 6,
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0
|
||||||
|
},
|
||||||
|
tickAmount: "undefined",
|
||||||
|
min: "undefined",
|
||||||
|
max: "undefined",
|
||||||
|
range: "undefined",
|
||||||
|
floating: false,
|
||||||
|
position: 'bottom',
|
||||||
|
title: {
|
||||||
|
text: "undefined",
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
style: {
|
||||||
|
color: "undefined",
|
||||||
|
fontSize: '12px',
|
||||||
|
cssClass: 'apexcharts-xaxis-title'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
crosshairs: {
|
||||||
|
show: true,
|
||||||
|
width: 1, // tickWidth/barWidth or an integer
|
||||||
|
position: 'back',
|
||||||
|
opacity: 0.9,
|
||||||
|
stroke: {
|
||||||
|
color: '#b6b6b6',
|
||||||
|
width: 0,
|
||||||
|
dashArray: 0
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
type: 'solid', // solid, gradient
|
||||||
|
color: '#B1B9C4',
|
||||||
|
gradient: {
|
||||||
|
colorFrom: '#D8E3F0',
|
||||||
|
colorTo: '#BED1E6',
|
||||||
|
stops: [0, 100],
|
||||||
|
opacityFrom: 0.4,
|
||||||
|
opacityTo: 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dropShadow: {
|
||||||
|
enabled: false,
|
||||||
|
left: 0,
|
||||||
|
top: 0,
|
||||||
|
blur: 1,
|
||||||
|
opacity: 0.4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
enabled: true,
|
||||||
|
offsetY: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
yaxis: yAxis,
|
||||||
|
theme: {
|
||||||
|
palette: 'palette1', // If defined, it will overwrite config.colors variable
|
||||||
|
monochrome: { // monochrome allows you to select just 1 color and fill out the rest with light/dark shade (intensity can be selected)
|
||||||
|
enabled: false,
|
||||||
|
color: '#008FFB',
|
||||||
|
shadeTo: 'light',
|
||||||
|
shadeIntensity: 0.65
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,28 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_annotations}
|
||||||
|
\alias{ax_annotations}
|
||||||
|
\title{Annotations properties}
|
||||||
|
\usage{
|
||||||
|
ax_annotations(ax, position = NULL, yaxis = NULL, xaxis = NULL,
|
||||||
|
points = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{position}{}
|
||||||
|
|
||||||
|
\item{yaxis}{}
|
||||||
|
|
||||||
|
\item{xaxis}{}
|
||||||
|
|
||||||
|
\item{points}{}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Annotations properties
|
||||||
|
}
|
|
@ -0,0 +1,54 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_chart}
|
||||||
|
\alias{ax_chart}
|
||||||
|
\title{Chart parameters}
|
||||||
|
\usage{
|
||||||
|
ax_chart(ax, type = NULL, stacked = NULL, stackType = NULL,
|
||||||
|
animations = NULL, background = NULL, foreColor = NULL,
|
||||||
|
dropShadow = NULL, events = NULL, offsetX = NULL, offsetY = NULL,
|
||||||
|
scroller = NULL, selection = NULL, sparkline = NULL, toolbar = NULL,
|
||||||
|
zoom = NULL, width = NULL, height = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{type}{Specify the chart type. Available Options: \code{"bar"}, \code{"column"}, \code{"line"},
|
||||||
|
\code{"histogram"}, \code{"pie"}, \code{"donut"}, \code{"radialBar"}, \code{"scatter"}, \code{"bubble"}, \code{"heatmap"}.}
|
||||||
|
|
||||||
|
\item{stacked}{Logical. Enables stacked option for axis charts.}
|
||||||
|
|
||||||
|
\item{animations}{List.}
|
||||||
|
|
||||||
|
\item{background}{Background color for the chart area. If you want to set background with css, use \code{.apexcharts-canvas} to set it.}
|
||||||
|
|
||||||
|
\item{foreColor}{Sets the text color for the chart. Defaults to \code{#373d3f}.}
|
||||||
|
|
||||||
|
\item{dropShadow}{List.}
|
||||||
|
|
||||||
|
\item{events}{List.}
|
||||||
|
|
||||||
|
\item{offsetX}{}
|
||||||
|
|
||||||
|
\item{offsetY}{}
|
||||||
|
|
||||||
|
\item{scroller}{List.}
|
||||||
|
|
||||||
|
\item{selection}{List.}
|
||||||
|
|
||||||
|
\item{sparkline}{List. Sparkline hides all the elements of the charts other than the primary paths. Helps to visualize data in small areas. .}
|
||||||
|
|
||||||
|
\item{zoom}{}
|
||||||
|
|
||||||
|
\item{width}{Width of the chart.}
|
||||||
|
|
||||||
|
\item{height}{Height of the chart.}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Chart parameters
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_colors}
|
||||||
|
\alias{ax_colors}
|
||||||
|
\title{Colors}
|
||||||
|
\usage{
|
||||||
|
ax_colors(ax, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{...}{Colors for the chart’s series. When all colors are used, it starts from the beginning.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Colors
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_dataLabels}
|
||||||
|
\alias{ax_dataLabels}
|
||||||
|
\title{Labels on data}
|
||||||
|
\usage{
|
||||||
|
ax_dataLabels(ax, enabled = NULL, textAnchor = NULL, offsetX = NULL,
|
||||||
|
offsetY = NULL, style = NULL, dropShadow = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{enabled}{}
|
||||||
|
|
||||||
|
\item{textAnchor}{}
|
||||||
|
|
||||||
|
\item{offsetX}{}
|
||||||
|
|
||||||
|
\item{offsetY}{}
|
||||||
|
|
||||||
|
\item{style}{}
|
||||||
|
|
||||||
|
\item{dropShadow}{}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Labels on data
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_fill}
|
||||||
|
\alias{ax_fill}
|
||||||
|
\title{Fill property}
|
||||||
|
\usage{
|
||||||
|
ax_fill(ax, type = NULL, colors = NULL, opacity = NULL, gradient = NULL,
|
||||||
|
image = NULL, pattern = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{type}{}
|
||||||
|
|
||||||
|
\item{colors}{}
|
||||||
|
|
||||||
|
\item{opacity}{}
|
||||||
|
|
||||||
|
\item{gradient}{}
|
||||||
|
|
||||||
|
\item{image}{}
|
||||||
|
|
||||||
|
\item{pattern}{}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Fill property
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_grid}
|
||||||
|
\alias{ax_grid}
|
||||||
|
\title{Add grids on chart}
|
||||||
|
\usage{
|
||||||
|
ax_grid(ax, show = NULL, borderColor = NULL, strokeDashArray = NULL,
|
||||||
|
position = NULL, xaxis = NULL, yaxis = NULL, row = NULL,
|
||||||
|
column = NULL, padding = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{show}{Logical. To show or hide grid area (including xaxis / yaxis)}
|
||||||
|
|
||||||
|
\item{borderColor}{Colors of grid borders / lines.}
|
||||||
|
|
||||||
|
\item{strokeDashArray}{Creates dashes in borders of svg path. Higher number creates more space between dashes in the border.}
|
||||||
|
|
||||||
|
\item{position}{Whether to place grid behind chart paths of in front. Available options for position: \code{"front"} or \code{"back"}}
|
||||||
|
|
||||||
|
\item{xaxis}{List.}
|
||||||
|
|
||||||
|
\item{yaxis}{List.}
|
||||||
|
|
||||||
|
\item{row}{List.}
|
||||||
|
|
||||||
|
\item{column}{List.}
|
||||||
|
|
||||||
|
\item{padding}{List.}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Add grids on chart
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_labels}
|
||||||
|
\alias{ax_labels}
|
||||||
|
\title{Alternative axis labels}
|
||||||
|
\usage{
|
||||||
|
ax_labels(ax, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{...}{}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Alternative axis labels
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_legend}
|
||||||
|
\alias{ax_legend}
|
||||||
|
\title{Legend properties}
|
||||||
|
\usage{
|
||||||
|
ax_legend(ax, show = NULL, floating = NULL, position = NULL,
|
||||||
|
horizontFalAlign = NULL, verticalAlign = NULL, fontSize = NULL,
|
||||||
|
textAnchor = NULL, offsetY = NULL, offsetX = NULL, formatter = NULL,
|
||||||
|
labels = NULL, markers = NULL, itemMargin = NULL,
|
||||||
|
containerMargin = NULL, onItemClick = NULL, onItemHover = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{show}{}
|
||||||
|
|
||||||
|
\item{floating}{}
|
||||||
|
|
||||||
|
\item{position}{}
|
||||||
|
|
||||||
|
\item{verticalAlign}{}
|
||||||
|
|
||||||
|
\item{fontSize}{}
|
||||||
|
|
||||||
|
\item{textAnchor}{}
|
||||||
|
|
||||||
|
\item{offsetY}{}
|
||||||
|
|
||||||
|
\item{offsetX}{}
|
||||||
|
|
||||||
|
\item{formatter}{}
|
||||||
|
|
||||||
|
\item{labels}{}
|
||||||
|
|
||||||
|
\item{markers}{}
|
||||||
|
|
||||||
|
\item{itemMargin}{}
|
||||||
|
|
||||||
|
\item{containerMargin}{}
|
||||||
|
|
||||||
|
\item{onItemClick}{}
|
||||||
|
|
||||||
|
\item{onItemHover}{}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
|
||||||
|
\item{horizontalAlign}{}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Legend properties
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_markers}
|
||||||
|
\alias{ax_markers}
|
||||||
|
\title{Markers properties}
|
||||||
|
\usage{
|
||||||
|
ax_markers(ax, discrete = NULL, size = NULL, colors = NULL,
|
||||||
|
strokeColor = NULL, strokeWidth = NULL, strokeOpacity = NULL,
|
||||||
|
fillOpacity = NULL, shape = NULL, radius = NULL, offsetX = NULL,
|
||||||
|
offsetY = NULL, hover = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{discrete}{}
|
||||||
|
|
||||||
|
\item{size}{}
|
||||||
|
|
||||||
|
\item{colors}{}
|
||||||
|
|
||||||
|
\item{strokeColor}{}
|
||||||
|
|
||||||
|
\item{strokeWidth}{}
|
||||||
|
|
||||||
|
\item{strokeOpacity}{}
|
||||||
|
|
||||||
|
\item{fillOpacity}{}
|
||||||
|
|
||||||
|
\item{shape}{}
|
||||||
|
|
||||||
|
\item{radius}{}
|
||||||
|
|
||||||
|
\item{offsetX}{}
|
||||||
|
|
||||||
|
\item{offsetY}{}
|
||||||
|
|
||||||
|
\item{hover}{}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Markers properties
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_noData}
|
||||||
|
\alias{ax_noData}
|
||||||
|
\title{No data specification}
|
||||||
|
\usage{
|
||||||
|
ax_noData(ax, text = NULL, align = NULL, verticalAlign = NULL,
|
||||||
|
offsetX = NULL, offsetY = NULL, style = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{text}{}
|
||||||
|
|
||||||
|
\item{align}{}
|
||||||
|
|
||||||
|
\item{verticalAlign}{}
|
||||||
|
|
||||||
|
\item{offsetX}{}
|
||||||
|
|
||||||
|
\item{offsetY}{}
|
||||||
|
|
||||||
|
\item{style}{}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
No data specification
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_plotOptions}
|
||||||
|
\alias{ax_plotOptions}
|
||||||
|
\title{Specific options for chart}
|
||||||
|
\usage{
|
||||||
|
ax_plotOptions(ax, bar = NULL, heatmap = NULL, radialBar = NULL,
|
||||||
|
pie = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{bar}{}
|
||||||
|
|
||||||
|
\item{heatmap}{}
|
||||||
|
|
||||||
|
\item{radialBar}{}
|
||||||
|
|
||||||
|
\item{pie}{}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Specific options for chart
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_responsive}
|
||||||
|
\alias{ax_responsive}
|
||||||
|
\title{Responsive options}
|
||||||
|
\usage{
|
||||||
|
ax_responsive(ax, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{...}{}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Responsive options
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_series}
|
||||||
|
\alias{ax_series}
|
||||||
|
\title{Add data to a chart}
|
||||||
|
\usage{
|
||||||
|
ax_series(ax, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Add data to a chart
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_states}
|
||||||
|
\alias{ax_states}
|
||||||
|
\title{Charts' states}
|
||||||
|
\usage{
|
||||||
|
ax_states(ax, normal = NULL, hover = NULL, active = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{normal}{}
|
||||||
|
|
||||||
|
\item{hover}{}
|
||||||
|
|
||||||
|
\item{active}{}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Charts' states
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_stroke}
|
||||||
|
\alias{ax_stroke}
|
||||||
|
\title{Stroke properties}
|
||||||
|
\usage{
|
||||||
|
ax_stroke(ax, show = NULL, curve = NULL, lineCap = NULL, width = NULL,
|
||||||
|
colors = NULL, dashArray = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{show}{Logical. To show or hide path-stroke / line}
|
||||||
|
|
||||||
|
\item{curve}{In line / area charts, whether to draw smooth lines or straight lines.
|
||||||
|
Available Options: \code{"smooth"} (connects the points in a curve fashion. Also known as spline)
|
||||||
|
and \code{"straight"} (connect the points in straight lines.).}
|
||||||
|
|
||||||
|
\item{lineCap}{For setting the starting and ending points of stroke. Available Options:
|
||||||
|
\code{"butt"} (ends the stroke with a 90-degree angle), \code{"square"}
|
||||||
|
(similar to butt except that it extends the stroke beyond the length of the path)
|
||||||
|
and \code{"round"} (ends the path-stroke with a radius that smooths out the start and end points)}
|
||||||
|
|
||||||
|
\item{width}{Sets the width of border for svg path.}
|
||||||
|
|
||||||
|
\item{colors}{Colors to fill the border for paths.}
|
||||||
|
|
||||||
|
\item{dashArray}{Creates dashes in borders of svg path. Higher number creates more space between dashes in the border.}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Stroke properties
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_subtitle}
|
||||||
|
\alias{ax_subtitle}
|
||||||
|
\title{Chart's subtitle}
|
||||||
|
\usage{
|
||||||
|
ax_subtitle(ax, text = NULL, align = NULL, margin = NULL,
|
||||||
|
offsetX = NULL, offsetY = NULL, floating = NULL, style = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{text}{Text to display as a subtitle of chart.}
|
||||||
|
|
||||||
|
\item{align}{Alignment of subtitle relative to chart area. Possible Options: \code{"left"}, \code{"center"} and \code{"right"}.}
|
||||||
|
|
||||||
|
\item{margin}{Numeric. Vertical spacing around the subtitle text.}
|
||||||
|
|
||||||
|
\item{offsetX}{Numeric. Sets the left offset for subtitle text.}
|
||||||
|
|
||||||
|
\item{offsetY}{Numeric. Sets the top offset for subtitle text}
|
||||||
|
|
||||||
|
\item{floating}{Logical. The floating option will take out the subtitle text from the chart area and make it float on top of the chart.}
|
||||||
|
|
||||||
|
\item{style}{List.}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Chart's subtitle
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_theme}
|
||||||
|
\alias{ax_theme}
|
||||||
|
\title{Theme for charts}
|
||||||
|
\usage{
|
||||||
|
ax_theme(ax, palette = NULL, monochrome = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{palette}{Character. Available palettes: \code{"palette1"} to \code{"palette10"}.}
|
||||||
|
|
||||||
|
\item{monochrome}{List.}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Theme for charts
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_title}
|
||||||
|
\alias{ax_title}
|
||||||
|
\title{Chart's title}
|
||||||
|
\usage{
|
||||||
|
ax_title(ax, text = NULL, align = NULL, margin = NULL, offsetX = NULL,
|
||||||
|
offsetY = NULL, floating = NULL, style = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{text}{}
|
||||||
|
|
||||||
|
\item{align}{}
|
||||||
|
|
||||||
|
\item{margin}{}
|
||||||
|
|
||||||
|
\item{offsetX}{}
|
||||||
|
|
||||||
|
\item{offsetY}{}
|
||||||
|
|
||||||
|
\item{floating}{}
|
||||||
|
|
||||||
|
\item{style}{}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Chart's title
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_tooltip}
|
||||||
|
\alias{ax_tooltip}
|
||||||
|
\title{Tooltip options}
|
||||||
|
\usage{
|
||||||
|
ax_tooltip(ax, enabled = NULL, shared = NULL, followCursor = NULL,
|
||||||
|
intersect = NULL, inverseOrder = NULL, custom = NULL,
|
||||||
|
fillSeriesColor = NULL, onDatasetHover = NULL, theme = NULL, x = NULL,
|
||||||
|
y = NULL, z = NULL, marker = NULL, items = NULL, fixed = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{enabled}{Logical. Show tooltip when user hovers over chart area.}
|
||||||
|
|
||||||
|
\item{shared}{Logical. When having multiple series, show a shared tooltip.}
|
||||||
|
|
||||||
|
\item{followCursor}{Logical. Follow user’s cursor position instead of putting tooltip on actual data points.}
|
||||||
|
|
||||||
|
\item{intersect}{Logical. Show tooltip only when user hovers exactly over datapoint.}
|
||||||
|
|
||||||
|
\item{inverseOrder}{Logical. In multiple series, when having shared tooltip, inverse the order of series (for better comparison in stacked charts).}
|
||||||
|
|
||||||
|
\item{custom}{JS function. Draw a custom html tooltip instead of the default one based on the values provided in the function arguments.}
|
||||||
|
|
||||||
|
\item{fillSeriesColor}{Logical. When enabled, fill the tooltip background with the corresponding series color.}
|
||||||
|
|
||||||
|
\item{onDatasetHover}{List.}
|
||||||
|
|
||||||
|
\item{theme}{List.}
|
||||||
|
|
||||||
|
\item{x}{List.}
|
||||||
|
|
||||||
|
\item{y}{List.}
|
||||||
|
|
||||||
|
\item{z}{List.}
|
||||||
|
|
||||||
|
\item{marker}{List.}
|
||||||
|
|
||||||
|
\item{items}{List.}
|
||||||
|
|
||||||
|
\item{fixed}{List.}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Tooltip options
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_xaxis}
|
||||||
|
\alias{ax_xaxis}
|
||||||
|
\title{X-axis options}
|
||||||
|
\usage{
|
||||||
|
ax_xaxis(ax, type = NULL, categories = NULL, labels = NULL,
|
||||||
|
axisBorder = NULL, axisTicks = NULL, tickAmount = NULL, min = NULL,
|
||||||
|
max = NULL, range = NULL, floating = NULL, position = NULL,
|
||||||
|
title = NULL, crosshairs = NULL, tooltip = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{type}{Character. Available Options : \code{"categories"} and \code{"datetime"}.}
|
||||||
|
|
||||||
|
\item{categories}{Categories are labels which are displayed on the x-axis.}
|
||||||
|
|
||||||
|
\item{labels}{List.}
|
||||||
|
|
||||||
|
\item{axisBorder}{List.}
|
||||||
|
|
||||||
|
\item{axisTicks}{List.}
|
||||||
|
|
||||||
|
\item{tickAmount}{Number of Tick Intervals to show.}
|
||||||
|
|
||||||
|
\item{min}{Lowest number to be set for the x-axis. The graph drawing beyond this number will be clipped off.}
|
||||||
|
|
||||||
|
\item{max}{Highest number to be set for the x-axis. The graph drawing beyond this number will be clipped off.}
|
||||||
|
|
||||||
|
\item{range}{Range takes the max value of x-axis, subtracts the provided range value and gets the min value based on that.
|
||||||
|
So, technically it helps to keep the same range when min and max values gets updated dynamically.}
|
||||||
|
|
||||||
|
\item{floating}{Logical. Floating takes x-axis is taken out of normal flow and places x-axis on svg element directly,
|
||||||
|
similar to an absolutely positioned element. Set the offsetX and offsetY then to adjust the position manually}
|
||||||
|
|
||||||
|
\item{position}{Setting this option allows you to change the x-axis position. Available options: \code{"top"} and \code{"bottom"}.}
|
||||||
|
|
||||||
|
\item{title}{List.}
|
||||||
|
|
||||||
|
\item{crosshairs}{List.}
|
||||||
|
|
||||||
|
\item{tooltip}{List.}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
X-axis options
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
% Generated by roxygen2: do not edit by hand
|
||||||
|
% Please edit documentation in R/apex-utils.R
|
||||||
|
\name{ax_yaxis}
|
||||||
|
\alias{ax_yaxis}
|
||||||
|
\title{Y-axis options}
|
||||||
|
\usage{
|
||||||
|
ax_yaxis(ax, opposite = NULL, tickAmount = NULL, max = NULL, min = NULL,
|
||||||
|
floating = NULL, labels = NULL, axisBorder = NULL, axisTicks = NULL,
|
||||||
|
title = NULL, tooltip = NULL, crosshairs = NULL, ...)
|
||||||
|
}
|
||||||
|
\arguments{
|
||||||
|
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
||||||
|
\item{opposite}{Logical. When enabled, will draw the yaxis on the right side of the chart.}
|
||||||
|
|
||||||
|
\item{tickAmount}{Number of Tick Intervals to show.}
|
||||||
|
|
||||||
|
\item{max}{Lowest number to be set for the y-axis. The graph drawing beyond this number will be clipped off.}
|
||||||
|
|
||||||
|
\item{min}{Highest number to be set for the y-axis. The graph drawing beyond this number will be clipped off.}
|
||||||
|
|
||||||
|
\item{floating}{Logical. Floating takes y-axis is taken out of normal flow and places y-axis on svg element directly,
|
||||||
|
similar to an absolutely positioned element. Set the offsetX and offsetY then to adjust the position manually}
|
||||||
|
|
||||||
|
\item{labels}{List.}
|
||||||
|
|
||||||
|
\item{axisBorder}{List.}
|
||||||
|
|
||||||
|
\item{axisTicks}{List.}
|
||||||
|
|
||||||
|
\item{title}{List.}
|
||||||
|
|
||||||
|
\item{tooltip}{List.}
|
||||||
|
|
||||||
|
\item{crosshairs}{List.}
|
||||||
|
|
||||||
|
\item{...}{Additional parameters.}
|
||||||
|
}
|
||||||
|
\value{
|
||||||
|
A \code{apexcharts} \code{htmlwidget} object.
|
||||||
|
}
|
||||||
|
\description{
|
||||||
|
Y-axis options
|
||||||
|
}
|
Loading…
Reference in New Issue