R/tooltips.R

#' Edit default tooltips
#'
#' Allows editing of the default tooltips.
#'
#' @param chartjs a \code{\link{chartjs}} object
#' @param ... named arguments, see Details
#'
#' @details The allowed values in \code{...} can be found in the
#' \href{http://www.chartjs.org/docs/#getting-started-global-chart-configuration}{Chart.js documentation}
#' under \code{Charts.default.global.tooltips}.
#' @export
#' @name tooltips
cjsTooltips <- function(chartjs, ...){
  ldots <- list(...)
  chartjs$x$options$tooltips <- ldots
  chartjs
}
Tutuchan/chartjs documentation built on May 9, 2019, 5:16 p.m.