update ApexCharts to 3.1.0
This commit is contained in:
parent
7143c6d378
commit
633d0e3f3b
|
@ -1,11 +1,11 @@
|
|||
Package: apexcharter
|
||||
Version: 0.0.0.9500
|
||||
Version: 0.0.0.9600
|
||||
Title: Create Interactive Chart with the JavaScript 'ApexCharts' Library
|
||||
Description: Provides an 'htmlwidgets' interface to 'apexcharts.js'.
|
||||
Authors@R: c(
|
||||
person("Victor", "Perrier", email = "victor.perrier@dreamrs.fr", role = c("aut", "cre")),
|
||||
person("Fanny", "Meyer", email = "fanny.meyer@dreamrs.fr", role = c("aut")),
|
||||
person("ApexCharts", role = c("cph"), comment = "apexcharts.js library"))
|
||||
person("Juned", "Chhipa", role = c("cph"), comment = "apexcharts.js library"))
|
||||
License: MIT + file LICENSE
|
||||
Encoding: UTF-8
|
||||
LazyData: true
|
||||
|
|
|
@ -26,23 +26,43 @@ mtcars_long <- mtcars %>%
|
|||
tibble::rownames_to_column(var = "model") %>%
|
||||
gather(variable, value, -model)
|
||||
|
||||
mtcars_long$value <- round(mtcars_long$value)
|
||||
|
||||
apexchart() %>%
|
||||
test <- apexchart() %>%
|
||||
ax_chart(type = "heatmap") %>%
|
||||
ax_dataLabels(enabled = FALSE) %>%
|
||||
ax_series2(lapply(
|
||||
X = unique(mtcars_long$model),
|
||||
FUN = function(x) {
|
||||
list(
|
||||
name = x,
|
||||
data = parse_df(mtcars_long[mtcars_long$model == x, c("variable", "value")])
|
||||
name = tolower(gsub(pattern = "\\s", replacement = "", x = x)),
|
||||
data = parse_df(
|
||||
data = mtcars_long[mtcars_long$model == x, c("variable", "value")],
|
||||
add_names = c("x", "y")
|
||||
)
|
||||
)
|
||||
}
|
||||
)) %>%
|
||||
ax_xaxis(type = "category", categories = unique(mtcars_long$variable))
|
||||
|
||||
|
||||
|
||||
apexchart() %>%
|
||||
ax_chart(type = "heatmap") %>%
|
||||
ax_dataLabels(enabled = FALSE) %>%
|
||||
ax_series2(l = list(
|
||||
list(
|
||||
name = "A",
|
||||
data = list(
|
||||
list(x = "a", y = "4"), list(x = "b", y = "2"), list(x = "c", y = "7")
|
||||
)
|
||||
),
|
||||
list(
|
||||
name = "B",
|
||||
data = list(
|
||||
list(x = "a", y = "5"), list(x = "b", y = "4"), list(x = "c", y = "1")
|
||||
)
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
dependencies:
|
||||
- name: apexcharts
|
||||
version: 2.4.2
|
||||
src: htmlwidgets/lib/apexcharts-2.4
|
||||
version: 3.1.0
|
||||
src: htmlwidgets/lib/apexcharts-3.1
|
||||
script: apexcharts.min.js
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue