Skip to content

Commit

Permalink
adding hc_elementId auxiliar function
Browse files Browse the repository at this point in the history
  • Loading branch information
jbkunst committed Jul 11, 2016
1 parent 08eb3ae commit e28ac7c
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 3 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export(hc_credits)
export(hc_defs)
export(hc_demo)
export(hc_drilldown)
export(hc_elementId)
export(hc_exporting)
export(hc_get_colors)
export(hc_get_dash_styles)
Expand Down
19 changes: 18 additions & 1 deletion R/api-hc-extras.R
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ hc_mapNavigation <- function(hc, ...) {
#'
#' Helper function to use the fill patter plugin http://www.highcharts.com/plugin-registry/single/9/Pattern-Fill.
#'
#'
#' @param hc A \code{highchart} \code{htmlwidget} object.
#' @param ... Arguments defined in \url{http://www.highcharts.com/plugin-registry/single/9/Pattern-Fill}.
#'
Expand Down Expand Up @@ -270,3 +269,21 @@ hc_motion <- function(hc, ...) {
.hc_opt(hc, "motion", ...)

}

#' Setting elementId
#'
#' Function to modify the \code{id} for the container.
#'
#' @param hc A \code{highchart} \code{htmlwidget} object.
#' @param id A string
#'
#' @examples
#'
#' hchart(rnorm(10)) %>%
#' hc_elementId("newid")
#'
#' @export
hc_elementId <- function(hc, id = NULL) {
hc$elementId <- as.character(id)
hc
}
1 change: 0 additions & 1 deletion man/hc_add_series_df.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions man/hc_elementId.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/highchart.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e28ac7c

Please sign in to comment.