etooltip: Add tooltip

Description Usage Arguments See Also Examples

View source: R/options.R

Description

Customise tooltip.

Usage

1
2
3
4
5
6
7
etooltip(p, show = TRUE, trigger = "axis", zlevel = 1, z = 8,
  showContent = TRUE, position = NULL, formatter = NULL,
  islandFormatter = "{a} < br/>{b} : {c}", showDelay = 20,
  hideDelay = 100, transitionDuration = 0.4, enterable = FALSE,
  backgroundColor = "rgba(0,0,0,0.7)", borderColor = "#333",
  borderRadius = 4, borderWidth = 0, padding = 5, axisPointer, textStyle,
  ...)

Arguments

p

an echart object.

show

whether to show the tooltip.

trigger

element that triggers the tooltip, takes item or axis.

z, zlevel

first and second grade cascading control, the higher z the closer to the top.

showContent

whether to show the content of tooltip.

position

specifies position, pass a list, like list(10, 10), fixed position; pass a function, like htmlwidgets::JS("function([x, y]) {return [x + 10, y + 10]}")

formatter

see http://echarts.baidu.com/echarts2/doc/option-en.html#tooltip.formatter for more details.

islandFormatter

island content formatter.

showDelay

number of milliseconds the tooltip shows.

hideDelay

number of milliseconds to wait until the tooltip is hidden when mouse out from a point or chart.

transitionDuration

duration in seconds of the animated transition.

enterable

whether to let the mouse go into the tip dom.

backgroundColor

background color.

borderColor

border color.

borderRadius

border radius.

borderWidth

border width.

padding

padding.

axisPointer

axis pointer, triggered by axis.

textStyle

tooltip text size.

...

any other options to pass to tooltip.

See Also

official tooltip docs

Examples

1
2
3
4
5
mtcars %>%
  echart(disp) %>%
  eline(mpg) %>%
  eline(qsec) %>%
  etooltip(trigger = "axis")

JohnCoene/echarts documentation built on May 22, 2021, 6:18 p.m.