addHeatmap: Add 'heatmap' to Echarts Object

Description Usage Arguments Value References

View source: R/options.R

Description

Add heatmap object to an Echarts object. (applicable for map)

Usage

1
2
3
4
5
6
addHeatmap(chart, series = NULL, timeslots = NULL, data = NULL,
  gradientColors = list("blue", "cyan", "limegreen", "yellow", "orange",
  "red"), blurSize = 30, minAlpha = 0.05, valueScale = 1, opacity = 1,
  mode = c("add", "overide"), ...)

overideHeatmap(chart, ...)

Arguments

chart

echarts object generated by echart or echartR.

series

Vector. Specify which series you want to insert heatmap. Could be numeric (index of the series) or string (series name). If NULL, then apply to all. Default NULL.

timeslots

Vector. Specify which timeslots (t) you want to insert heatmap. Could be numeric (index of the timeslot) or string (timeslot name). If NULL, then apply to all. Default NULL. You could use t for short.

data

The heatmap source data. Two modes:

data.frame or matrix

A data.frame or matrix of 3 columns: lng (-180 ~ 180), lat (-90 ~ 90) and heat value (0-1). If heat value is out of the range [0,1], then it will be normalized.

list

A list in the form: list(c(<lng1>, <lat1>, <value1>), c(<lng2>, <lat2>, <value2>), ...)

gradientColors

Color palette of heat visualization. Three mode:

vector

A vector of colors (hex, name, or rgba string)

data.frame or matrix

A data.frame or matrix of 2 columns: offset (0-1), and color (hex, name or rgba string).

list

A list in the form: list(list(offset=0.2, color='red'), list(offset=0.5, color='green'), ...)


Default c('blue', 'cyan', 'lime', 'yellow', 'orange', 'red').

blurSize

Size of blur. Default 30.

minAlpha

Minimal alpha value which any opacity value below this threshold will be set minAlpha in order to prevent over-transparency. Default 0.05.

valueScale

Numeric. Scale of value that all the heat value will be multiplied by this value before plotting. Default 1.

opacity

Numeric 0-1. Degree of opacity. Default 1.

mode

'add' or 'overide' heatmap to the echarts object. Default 'add'. You can use overideHeatmap to overide existing heatmap.

...

Elipsis

Value

A modified echarts object

References

http://echarts.baidu.com/echarts2/doc/option.html#title~series-i(map).heatmap


madlogos/recharts2 documentation built on May 21, 2019, 11:03 a.m.