addAnnotToDataLabel: Adds html code to the data labels include the annotation

View source: R/annotdata.R

addAnnotToDataLabelR Documentation

Adds html code to the data labels include the annotation

Description

Adds html code to the data labels include the annotation

Usage

addAnnotToDataLabel(
  data.label.text,
  annotation,
  tmp.dat,
  prepend = FALSE,
  tspan = FALSE
)

Arguments

data.label.text

A character vector containing the original data labels which is to be annotated

annotation

An element of the annotation.list passed to the top level charting function. The is usually a list with named elements such as "type", "size", "font.family", "format". Note that this function will not handle annotation of type "Circle - xxx" or "Marker border" because these are implemented as additional traces.

tmp.dat

A slice of annot.dat which matches data.label.text It is used when annotation$type is "Text".

prepend

Logical; when true, the annotation will be added to the beginning of data.label.text instead of the end.

tspan

Whether to use tspan instead of span. tspan is used when the annotation is directly inserted into an svg text element, whereas span is used with Plotly-drawn labels (Plotly automatically converts it to tspan).

Value

The modified character vector data.label.text.


Displayr/flipStandardCharts documentation built on Feb. 28, 2025, 4:36 p.m.