addNameMap: Add 'nameMap' to Echarts Object

Description Usage Arguments Value References See Also

View source: R/options.R

Description

For map charts, you can add nameMap to translate the place names from one to another. The nameMap object will be inserted to the first series of the echarts object.

Usage

1
2
3
addNameMap(chart, nameMap, mode = c("add", "overide"))

overideNameMap(chart, ...)

Arguments

chart

echarts object generated by echart or echartR.

nameMap

Two modes:

data.frame/matrix

A data.frame or matrix comprising of 2 columns: nameToTranslate & nameTranslatedTo. E.g., You can load a preinstalled Chinese-English geographic dictionary using recharts:::geoNameMap.

list

The nameMap in list should follow the structure: list(list( `United States of America`='USA'), list('United Kingdom'='GB'), ...)

mode

'add' or 'overide' nameMap to the echarts object. Default 'add'. You can use overideNameMap to overide existing nameMap.

Value

A modified echarts object

References

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

See Also

data(geoNameMap)


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