update ApexCharts to 3.6.12
This commit is contained in:
parent
3979d0c44c
commit
a4e65a36c8
|
@ -1,5 +1,5 @@
|
|||
Package: apexcharter
|
||||
Version: 0.0.4.910
|
||||
Version: 0.0.4.920
|
||||
Title: Create Interactive Chart with the JavaScript 'ApexCharts' Library
|
||||
Description: Provides an 'htmlwidgets' interface to 'apexcharts.js'.
|
||||
Authors@R: c(
|
||||
|
|
14
R/apex.R
14
R/apex.R
|
@ -45,20 +45,30 @@ apex <- function(data, mapping, type = "column", ..., auto_update = TRUE, width
|
|||
make_series <- function(mapdata, mapping, type) {
|
||||
mapdata <- as.data.frame(mapdata)
|
||||
series_names <- "Series"
|
||||
if (is_x_datetime(mapdata)) {
|
||||
add_names <- FALSE
|
||||
} else {
|
||||
add_names <- names(mapping)
|
||||
}
|
||||
if (!is.null(mapping$y))
|
||||
series_names <- rlang::as_label(mapping$y)
|
||||
series <- list(list(
|
||||
name = series_names,
|
||||
data = parse_df(mapdata, add_names = names(mapping))
|
||||
data = parse_df(mapdata, add_names = add_names)
|
||||
))
|
||||
if (is_grouped(names(mapping))) {
|
||||
mapdata <- rename_aes(mapdata)
|
||||
series <- lapply(
|
||||
X = unique(mapdata$group),
|
||||
FUN = function(x) {
|
||||
data <- mapdata[mapdata$group %in% x, ]
|
||||
data <- data[, setdiff(names(data), "group"), drop = FALSE]
|
||||
list(
|
||||
name = x,
|
||||
data = parse_df(mapdata[mapdata$group %in% x, ], add_names = names(mapping))
|
||||
data = parse_df(
|
||||
data = data,
|
||||
add_names = add_names
|
||||
)
|
||||
)
|
||||
}
|
||||
)
|
||||
|
|
|
@ -135,5 +135,5 @@ apexchart(ax_opts = list(
|
|||
))
|
||||
```
|
||||
|
||||
![alt text](img/raw-lines.png)
|
||||
![alt text](img/raw-api.png)
|
||||
|
||||
|
|
BIN
img/api-bars.png
BIN
img/api-bars.png
Binary file not shown.
Before Width: | Height: | Size: 20 KiB |
Binary file not shown.
Before Width: | Height: | Size: 30 KiB |
|
@ -1,5 +1,5 @@
|
|||
dependencies:
|
||||
- name: apexcharts
|
||||
version: 3.6.10
|
||||
version: 3.6.12
|
||||
src: htmlwidgets/lib/apexcharts-3.6
|
||||
script: apexcharts.min.js
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
Loading…
Reference in New Issue