#' Generate text for trajectory popup fields on the graph
#'
#' @param ptitle The popup title.
#' @param pnames \code{vector} containing attribute names.
#' @param pvalues \code{vector} containing attribute values.
#'
#' @noRd
popup <- function (ptitle, pnames, pvalues)
{
txt <- paste0 ("<b>", ptitle, "</b>")
for (i in seq_along (pnames))
{
att <- pnames [i]
val <- format (pvalues [[i]], digits = 3, nsmall = 2)
txt %<>% paste0 ("</br><b>", att, ": </b>", val)
}
txt
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.