From e0b6e28913363e902d324d39e3d5c0b92a20bb0e Mon Sep 17 00:00:00 2001 From: pvictor Date: Wed, 27 Nov 2019 23:17:23 +0100 Subject: [PATCH] prepare cran release --- DESCRIPTION | 5 +++-- NEWS.md | 2 +- R/apex-utils.R | 2 +- R/data.R | 6 +++--- R/format.R | 6 +++--- cran-comments.md | 5 +---- man/ax_chart.Rd | 2 +- man/format_num.Rd | 6 +++--- man/unhcr_popstats_2017.Rd | 2 +- man/unhcr_ts.Rd | 4 ++-- vignettes/advanced-configuration.Rmd | 16 ++++++++-------- 11 files changed, 27 insertions(+), 29 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1c4ca16..ea27213 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: apexcharter -Version: 0.1.2.930 +Version: 0.1.3 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. @@ -7,7 +7,8 @@ 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 = "aut"), - person("Juned", "Chhipa", role = "cph", comment = "apexcharts.js library")) + person("Juned", "Chhipa", role = "cph", comment = "apexcharts.js library"), + person("Mike", "Bostock", role = "cph", comment = "d3.format library")) License: MIT + file LICENSE Encoding: UTF-8 LazyData: true diff --git a/NEWS.md b/NEWS.md index 9ccf11f..198e33d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,7 +10,7 @@ apexcharter 0.1.3 apexcharter 0.1.2 ================== -* Update ApexCharts to 3.8.2 +* Upgraded ApexCharts.js to 3.8.2 * Set parent container height to 0 by default (fix [#2](https://github.com/dreamRs/apexcharter/issues/2)). diff --git a/R/apex-utils.R b/R/apex-utils.R index 6a4d903..e046a89 100644 --- a/R/apex-utils.R +++ b/R/apex-utils.R @@ -139,7 +139,7 @@ ax_annotations <- function(ax, #' @param defaultLocale Locale to use : \code{"de"}, \code{"el"}, \code{"en"}, \code{"es"}, \code{"fr"}, #' \code{"hi"}, \code{"hr"}, \code{"hy"}, \code{"id"}, \code{"it"}, \code{"ko"}, \code{"pt-br"}, #' \code{"ru"}, \code{"tr"}, \code{"ua"}. -#' @param locales Array of custom localizations paremeters. +#' @param locales Array of custom locales parameters. #' @param animations A list of parameters. #' @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}. diff --git a/R/data.R b/R/data.R index 6ea46cc..c016966 100644 --- a/R/data.R +++ b/R/data.R @@ -12,13 +12,13 @@ #' \item{\code{continent_residence}}{Continent of origin of population} #' \item{\code{continent_origin}}{Continent of residence of population} #' } -#' @source UNHCR (The UN Refugee Agency) (\url{http://popstats.unhcr.org/en/overview}) +#' @source UNHCR (The UN Refugee Agency) (\url{https://www.unhcr.org/}) "unhcr_popstats_2017" #' UNHCR data by continent of origin #' -#' The dataset contains data about UNHCR's populations of concern summarised by continent of orginin. +#' The dataset contains data about UNHCR's populations of concern summarised by continent of origin. #' #' @format A data frame with 913 observations on the following 4 variables. #' \describe{ @@ -28,6 +28,6 @@ #' \item{\code{continent_origin}}{Continent of residence of population.} #' \item{\code{n}}{Number of people concerned.} #' } -#' @source UNHCR (The UN Refugee Agency) (\url{http://popstats.unhcr.org/en/overview}) +#' @source UNHCR (The UN Refugee Agency) (\url{https://www.unhcr.org/}) "unhcr_ts" diff --git a/R/format.R b/R/format.R index 8093479..de6d8cf 100644 --- a/R/format.R +++ b/R/format.R @@ -3,9 +3,9 @@ #' #' @param format Format for numbers, currency, percentage, e.g. \code{".0\%"} for rounded percentage. #' See online documentation : \url{https://github.com/d3/d3-format}. -#' @param prefix Character string to append before formatd value. -#' @param suffix Character string to append after formatd value. -#' @param locale Localization to use, for exemple \code{"fr-FR"} for french, +#' @param prefix Character string to append before formatted value. +#' @param suffix Character string to append after formatted value. +#' @param locale Localization to use, for example \code{"fr-FR"} for french, #' see possible values here: \url{https://github.com/d3/d3-format/tree/master/locale}. #' #' @return a \code{JS} function diff --git a/cran-comments.md b/cran-comments.md index 5f1c994..5ca7a21 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -7,10 +7,7 @@ 0 errors | 0 warnings | 0 note -* This is a new release. - -Update JavaScript library. -Fix issue with sizing in Shiny. +* New features and updated javascript dependencies Thank you! diff --git a/man/ax_chart.Rd b/man/ax_chart.Rd index 59f3834..92c6c7c 100644 --- a/man/ax_chart.Rd +++ b/man/ax_chart.Rd @@ -42,7 +42,7 @@ Available options: \code{"normal"} or \code{"100\%"}.} \code{"hi"}, \code{"hr"}, \code{"hy"}, \code{"id"}, \code{"it"}, \code{"ko"}, \code{"pt-br"}, \code{"ru"}, \code{"tr"}, \code{"ua"}.} -\item{locales}{Array of custom localizations paremeters.} +\item{locales}{Array of custom locales parameters.} \item{animations}{A list of parameters.} diff --git a/man/format_num.Rd b/man/format_num.Rd index 0344ed4..33a58f1 100644 --- a/man/format_num.Rd +++ b/man/format_num.Rd @@ -10,11 +10,11 @@ format_num(format, prefix = "", suffix = "", locale = "en-US") \item{format}{Format for numbers, currency, percentage, e.g. \code{".0\%"} for rounded percentage. See online documentation : \url{https://github.com/d3/d3-format}.} -\item{prefix}{Character string to append before formatd value.} +\item{prefix}{Character string to append before formatted value.} -\item{suffix}{Character string to append after formatd value.} +\item{suffix}{Character string to append after formatted value.} -\item{locale}{Localization to use, for exemple \code{"fr-FR"} for french, +\item{locale}{Localization to use, for example \code{"fr-FR"} for french, see possible values here: \url{https://github.com/d3/d3-format/tree/master/locale}.} } \value{ diff --git a/man/unhcr_popstats_2017.Rd b/man/unhcr_popstats_2017.Rd index e982cfc..b1b6816 100644 --- a/man/unhcr_popstats_2017.Rd +++ b/man/unhcr_popstats_2017.Rd @@ -15,7 +15,7 @@ \item{\code{continent_origin}}{Continent of residence of population} }} \source{ -UNHCR (The UN Refugee Agency) (\url{http://popstats.unhcr.org/en/overview}) +UNHCR (The UN Refugee Agency) (\url{https://www.unhcr.org/}) } \usage{ unhcr_popstats_2017 diff --git a/man/unhcr_ts.Rd b/man/unhcr_ts.Rd index dbc16ec..1b2ac8c 100644 --- a/man/unhcr_ts.Rd +++ b/man/unhcr_ts.Rd @@ -13,12 +13,12 @@ \item{\code{n}}{Number of people concerned.} }} \source{ -UNHCR (The UN Refugee Agency) (\url{http://popstats.unhcr.org/en/overview}) +UNHCR (The UN Refugee Agency) (\url{https://www.unhcr.org/}) } \usage{ unhcr_ts } \description{ -The dataset contains data about UNHCR's populations of concern summarised by continent of orginin. +The dataset contains data about UNHCR's populations of concern summarised by continent of origin. } \keyword{datasets} diff --git a/vignettes/advanced-configuration.Rmd b/vignettes/advanced-configuration.Rmd index 0d6a00a..89c28ef 100644 --- a/vignettes/advanced-configuration.Rmd +++ b/vignettes/advanced-configuration.Rmd @@ -29,7 +29,7 @@ Here some advanced configuration examples to use the full potential of [ApexChar This example is taken from [{hrbrthemes}](https://github.com/hrbrmstr/hrbrthemes) readme, it use `mpg` dataset from [{ggplot2}](https://github.com/tidyverse/ggplot2). -Tranform data and initialize the chart : +Transform data and initialize the chart : ```{r} data("mpg", package = "ggplot2") @@ -155,9 +155,9 @@ count(mpg, class) %>% # Lines -Dataset used is from the UNHCR (The UN Refugee Agency) and contains data about UNHCR's populations of concern summarised by continent of orginin. +Dataset used is from the UNHCR (The UN Refugee Agency) and contains data about UNHCR's populations of concern summarised by continent of origin. -Tranform data and initialize the chart : +Transform data and initialize the chart : ```{r} data("unhcr_ts") @@ -324,7 +324,7 @@ unhcr_ts %>% Dataset used is from [{gapminder}](https://github.com/jennybc/gapminder). -Tranform data and initialize the chart : +Transform data and initialize the chart : ```{r} data("gapminder", package = "gapminder") @@ -368,7 +368,7 @@ scatter <- scatter %>% ) ``` -Configuration for x-axis, hide the tooltip displayed on the axis itself (not the main tooltip), dispaly two decimals in the labels (useful when zooming, since values are logarithm there's a lot of decimals) : +Configuration for x-axis, hide the tooltip displayed on the axis itself (not the main tooltip), display two decimals in the labels (useful when zooming, since values are logarithm there's a lot of decimals) : ```{r} scatter <- scatter %>% @@ -404,7 +404,7 @@ scatter <- scatter %>% ax_markers(hover = list(sizeOffset = 0, size = 25)) ``` -Add a custom tooltip with an HTML string, data used in aesthetic can be accessed in JavaScrip with `w.config.series[seriesIndex].data[dataPointIndex].x` (x is the variable `gdpPercap`), or `w.config.series[seriesIndex].data[dataPointIndex].label` (the country), it's possible to use custom aesthetics to include more data in the chart configuration script. +Add a custom tooltip with an HTML string, data used in aesthetic can be accessed in JavaScript with `w.config.series[seriesIndex].data[dataPointIndex].x` (x is the variable `gdpPercap`), or `w.config.series[seriesIndex].data[dataPointIndex].label` (the country), it's possible to use custom aesthetics to include more data in the chart configuration script. ```{r} scatter <- scatter %>% @@ -574,7 +574,7 @@ gapminder %>% # Heatmap -This is an adaption of this fancy [{highcharter} example](http://jkunst.com/highcharter/showcase.html), based from this [WSJ visualisation](http://graphics.wsj.com/infectious-diseases-and-vaccines/). +This is an adaption of this fancy [{highcharter} example](http://jkunst.com/highcharter/showcase.html), based from this [WSJ visualization](http://graphics.wsj.com/infectious-diseases-and-vaccines/). ```{r} @@ -683,7 +683,7 @@ heatmap <- heatmap %>% ) ``` -Add a vertical line to identify the year when the vaccine was intrtoduced : +Add a vertical line to identify the year when the vaccine was introduced : ```{r} heatmap <- heatmap %>%