update ApexCharts to 2.2.0

This commit is contained in:
pvictor 2018-11-06 09:04:16 +01:00
parent 22d0c32d7c
commit a06c4c0a38
7 changed files with 24 additions and 5 deletions

View File

@ -1,5 +1,5 @@
Package: apexcharter
Version: 0.0.0.9200
Version: 0.0.0.9300
Title: Create Interactive Chart with the JavaScript 'ApexCharts' Library
Description: Provides an 'htmlwidgets' interface to 'apexcharts.js'.
Authors@R: c(
@ -10,6 +10,7 @@ License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
ByteCompile: true
Depends: R (>= 2.10)
Imports:
htmlwidgets,
magrittr,

View File

@ -11,6 +11,7 @@ export(ax_dataLabels)
export(ax_fill)
export(ax_grid)
export(ax_labels)
export(ax_labels2)
export(ax_legend)
export(ax_markers)
export(ax_plotOptions)

View File

@ -217,16 +217,25 @@ ax_grid <- function(ax,
#' Alternative axis labels
#'
#' @param ax A \code{apexcharts} \code{htmlwidget} object.
#' @param labels A vector to use as labels.
#' @param ... Vector. In Axis Charts (line / column), labels can be set instead of setting xaxis categories
#' option. While, in pie/donut charts, each label corresponds to value in series array.
#'
#' @return A \code{apexcharts} \code{htmlwidget} object.
#' @export
#'
#' @name ax_labels
#'
#' @note See \url{https://apexcharts.com/docs/options/labels/}
ax_labels <- function(ax, ...) {
.ax_opt(ax, "labels", ...)
}
#' @rdname ax_labels
#' @export
ax_labels2 <- function(ax, labels) {
.ax_opt2(ax, "labels", l = labels)
}
#' Legend properties

View File

@ -22,7 +22,8 @@ library(apexcharter)
apexchart() %>%
ax_chart(type = "pie") %>%
ax_series(23, 45, 56)
ax_series(23, 45, 56) %>%
ax_labels("A", "B", "C")
@ -32,6 +33,7 @@ apexchart() %>%
apexchart() %>%
ax_chart(type = "donut") %>%
ax_series2(l = c(23, 45, 56))
ax_series2(c(23, 45, 56)) %>%
ax_labels2(c("A", "B", "C"))

View File

@ -1,5 +1,5 @@
dependencies:
- name: apexcharts
version: 2.1.8
src: htmlwidgets/lib/apexcharts-2.1
version: 2.2.0
src: htmlwidgets/lib/apexcharts-2.2
script: apexcharts.min.js

File diff suppressed because one or more lines are too long

View File

@ -2,15 +2,20 @@
% Please edit documentation in R/apex-utils.R
\name{ax_labels}
\alias{ax_labels}
\alias{ax_labels2}
\title{Alternative axis labels}
\usage{
ax_labels(ax, ...)
ax_labels2(ax, labels)
}
\arguments{
\item{ax}{A \code{apexcharts} \code{htmlwidget} object.}
\item{...}{Vector. In Axis Charts (line / column), labels can be set instead of setting xaxis categories
option. While, in pie/donut charts, each label corresponds to value in series array.}
\item{labels}{A vector to use as labels.}
}
\value{
A \code{apexcharts} \code{htmlwidget} object.