Merge pull request #6 from dreamRs/update-apexcharts

Update apexcharts
This commit is contained in:
Victor Perrier 2020-02-12 10:41:50 +01:00 committed by GitHub
commit e6e60e4032
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 55 additions and 16 deletions

View File

@ -1,5 +1,5 @@
Package: apexcharter
Version: 0.1.3.900
Version: 0.1.3.910
Title: Create Interactive Chart with the JavaScript 'ApexCharts' Library
Description: Provides an 'htmlwidgets' interface to 'apexcharts.js'.
'Apexcharts' is a modern JavaScript charting library to build interactive charts and visualizations with simple API.

View File

@ -23,7 +23,8 @@
#' @example examples/apex.R
apex <- function(data, mapping, type = "column", ..., auto_update = TRUE, width = NULL, height = NULL, elementId = NULL) {
type <- match.arg(type, c("column", "bar", "line", "area", "spline", "area-spline",
"pie", "donut", "radialBar", "radar", "scatter", "heatmap"))
"pie", "donut", "radialBar", "radar", "scatter", "heatmap",
"rangeBar"))
data <- as.data.frame(data)
if (identical(type, "heatmap")) {
mapping <- rename_aes_heatmap(mapping)
@ -210,6 +211,7 @@ config_line <- function(curve = "straight", datetime = FALSE) {
config_scatter <- function(range_x, range_y) {
config <- list(
xaxis = list(
type = "numeric",
min = range_x[1], max = range_x[2]
),
yaxis = list(

View File

@ -1,7 +1,7 @@
dependencies:
- name: apexcharts
version: 3.10.1
src: htmlwidgets/lib/apexcharts-3.10
version: 3.15.5
src: htmlwidgets/lib/apexcharts-3.15
script: apexcharts.min.js
- name: d3-format
version: 1.4.2

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

View File

@ -668,7 +668,8 @@ heatmap <- heatmap %>%
"function(seriesName, opts) {
if (seriesName == 'Missing') return null; else return seriesName;
}"
)
),
itemMargin = list(vertical = 5)
)
```
@ -701,7 +702,7 @@ heatmap <- heatmap %>%
text = "Vaccine Introduced",
orientation = "horizontal",
position = "bottom",
offsetY = 10
offsetY = 0
)
)
)
@ -789,7 +790,8 @@ apex(vaccines, aes(year, state, fill = count), type = "heatmap") %>%
"function(seriesName, opts) {
if (seriesName == 'Missing') return null; else return seriesName;
}"
)
),
itemMargin = list(vertical = 5)
) %>%
ax_yaxis(
labels = list(
@ -811,7 +813,7 @@ apex(vaccines, aes(year, state, fill = count), type = "heatmap") %>%
text = "Vaccine Introduced",
orientation = "horizontal",
position = "bottom",
offsetY = 10
offsetY = 0
)
)
)

View File

@ -113,8 +113,7 @@ apex(data = mtcars, type = "scatter", mapping = aes(x = wt, y = mpg))
Color points according to a third variable:
```{r scatter-fill}
apex(data = mtcars, type = "scatter", mapping = aes(x = wt, y = mpg, fill = cyl)) %>%
ax_xaxis(tickAmount = 5)
apex(data = mtcars, type = "scatter", mapping = aes(x = wt, y = mpg, fill = cyl))
```
And change point size using `z` aesthetics: