ecolorbar: Customise colorbar

Description Usage Arguments Details See Also Examples

View source: R/options.R

Description

Customise the colorbar of your chart.

Usage

1
2
3
4
5
6
7
ecolorbar(p, min = NULL, max = NULL, which = "previous", show = TRUE,
  color = NULL, zlevel = 4, z = 0, orient = "vertical", x = "left",
  y = "bottom", backgroundColor = "rgba(0,0,0,0)", borderColor = "#ccc",
  borderWidth = 0, padding = 5, itemGap = 10, itemWidth = 20,
  itemHeight = 14, precision = 0, splitNumber = 5, splitList = NULL,
  range = NULL, selectedMode = TRUE, calculable = FALSE,
  hoverLink = TRUE, realtime = FALSE, ...)

Arguments

p

an echart object.

min, max

minimum and maximum.

which

series to serie is to be affected, takes the name of a serie, previous or all.

show

whether to show the color bar.

color

colors as list from high to low. i.e.: list("red", "blue").

z, zlevel

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

orient

orientation of bar, vertical or horizontal.

x

x position; left or right.

y

y posotion; top or bottom.

backgroundColor

background color.

borderColor

border color.

borderWidth

width of border.

padding

padding.

itemGap

gap between items on bar.

itemWidth

width of the bar.

itemHeight

height of the bar.

precision

decimal precision.

splitNumber

number of segments.

splitList

see official docs for details.

range

used to set initial range i.e.: list(start = 10, end = 50).

selectedMode

selection mode.

calculable

whether values are calculable.

hoverLink

hoverlink with map.

realtime

set to TRUE if using real time stream.

...

any other argument to pass to color bar.

Details

ecolorbar refers to datarange in docs.

See Also

official dataRange docs

Examples

1
2
3
4
5
6
7
8
df <- data.frame(x = 1:20,
                 y = runif(20, 5, 10),
                 size = runif(20, 5, 15))

df %>%
  echart(x) %>%
  escatter(y, size, symbolSize = 10, legendHoverLink = TRUE) %>%
  ecolorbar(color = list("red", "blue"), min = 5, max = 15, calculable = TRUE)

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