tui-options: Set options for a chart

Description Usage Arguments Value Examples

Description

Set options for a chart

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15

Arguments

tui

A tuichart htmlwidget object.

...

Named parameters, see http://nhn.github.io/tui.chart/latest/tui.chart.

Value

A tuichart htmlwidget object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# See the vignette for examples
vignette("options", package = "tuichartr")


library(tuichartr)

# a classic scatter plot
my_scatter <- tuichart("scatter") %>%
  add_data(iris, aes(Sepal.Length, Sepal.Width, group = Species))


# add a title
my_scatter %>%
  tui_chart(title = "Classic Iris example")

# format numeric values in all chart
# (x-axis, y-axis, tooltip)
my_scatter %>%
  tui_chart(format = "0.00")


# hide legend
my_scatter %>%
  tui_legend(visible = FALSE)

# or change position and hide
# checkbox to show/hide group
my_scatter %>%
  tui_legend(
    align = "bottom", # or top, left, right
    showCheckbox = FALSE
  )


# hide the export menu
my_scatter %>%
  tui_chartExportMenu(visible = FALSE)


# some options for axis
my_scatter %>%
  tui_xAxis(
    tickInterval = "auto",
    title = "X axis title" # title
  ) %>%
  tui_yAxis(
    max = 10 # y max value
  )

dreamRs/tuichartr documentation built on Aug. 8, 2020, 9:58 a.m.