eLiquid: Create an HTML Liquid charts widget using the...

Description Usage Arguments Note Examples

View source: R/eLiquid.R

Description

This function creates an HTML widget to display matrix, data.frame and factor array, using the JavaScript library ECharts3.

Usage

1
2
3
4
5
6
7
8
eLiquid(percentDat, wave = 3, radius = "80%", size = NULL,
  theme = "default", title = NULL, subtitle = NULL,
  title.x = "center", title.y = "top", toolbox = FALSE,
  toolbox.orient = "horizontal", toolbox.x = "right",
  toolbox.y = "top", dataView = TRUE, readOnly = FALSE,
  mark = TRUE, dataZoom = FALSE, magicType = TRUE, tooltip = TRUE,
  tooltip.trigger = "axis", tooltip.formatter = "",
  calculable = TRUE, showLabel = TRUE, opt = list())

Arguments

percentDat

percent data

wave

number of waves, default is 3

radius

raduis for liquid chart, default is '80%'

size

an array of html widget width and height(either numeric pixels or percentage could be accepted): e.g. size = c(1024, 768).

theme

an object of theme name. see(http://datatables.net/extensions/index) for detail. supported theme: c("default", "vintage", "dark", "westeros", "essos", "wonderland", "walden", "chalk", "infographic", "macarons", "roma", "shine", "purple-passion")

title

an overall title for the plot. you can modify title widget after chart has been generated: barEchart + eTitle(title = "your title.")

title.x, title.y

the xy coordinates of main title, besides the excat exact pixels value, x accept c("left", "right", "center") and y accept c("top", "bottom", "center") as legal input. you can modify title widget after chart has been generated: barEchart + eTitle(title="main title", x = "left", y=10)

toolbox

logical whether the toolbox widget show or not, default is TRUE. you can modify toolbox widget after chart has been generated, the toolbox position, toolbox element and toolbox orientation are available at present. barEchart + eToolbox(show = TRUE)

toolbox.orient

an element of c("horizontal", "vertical"), default is "horizontal" you can modify toolbox widget after chart has been generated: barEchart + eToolbox(orient = "vertical")

toolbox.x, toolbox.y

the xy coordinates of toolbox, besides the excat exact pixels value, x accept c("left", "right", "center") and y accept c("top", "bottom", "center") as legal input. you can modify toolbox widget after chart has been generated: barEchart + eToolbox(x = "right", y="top")

tooltip

logical whether the tooltip widget for front-end interactive chart show or not. default is TRUE. you can modify tooltip widget after chart has been generated, the tooltip trigger and tooltip formatter is available at present. barEchart + eTooltip(show = FALSE)

tooltip.trigger

an element of c("axis", "item"), default is "axis" for bar chart. "axis" option for trigger will show all the information of mouse; "item" option for tirgger will only show the given item information of mouse. you can modify tooltip widget after chart has been generated: barEchart + eTooltip(trigger = "axis")

tooltip.formatter

the information formatter for tooltip widget, default is "<a>:<b><c>" for bar chart. you can modify tooltip widget after chart has been generated: barEchart + eTooltip(formatter = "<a><b>:<c>")

calculable

logical whether the front-end interactive chart will support the drag-recalculable feature. the size and calculable option can be setted after bar chart has been generated through eOption: barEchart + eOption(calculable = TRUE)

legend

logical whether the legend widget show or not, default is TRUE. you can modify legend widget after chart has been generated, the legend position and legend orientation are available at present. barEchart + eLegend(show = TRUE)

legend.x, legend.y

the xy coordinates of legend, besides the excat exact pixels value, x accept c("left", "right", "center") and y accept c("top", "bottom", "center") as legal input. you can modify legend widget after chart has been generated: barEchart + eLegend(x = "right", y="top")

legend.orient

an element of c("horizontal", "vertical"), default is "horizontal" you can modify legend widget after chart has been generated: barEchart + eLegend(orient = "vertical")

dataview, mark, restore, dataZoom, magicType

logical variable whether the dataview , mark, restore, dataZoom or magicType tool in toolbox widget show or not, default is TRUE. you can modify toolbox widget after chart has been generated, the toolbox position, toolbox element and toolbox orientation are available at present. barEchart + eToolbox(dataView = FALSE)

Note

You are recommended to use lazyPlot function for interactive chart option set through "shiny" server.

Examples

1
2
eLiquid(0.6)
eLiquid(0.6,wave = 6)

cosname/recharts documentation built on Aug. 29, 2020, 9:47 a.m.