hc_zAxis: Zaxis options for highcharter objects

Description Usage Arguments Examples

View source: R/highcharts-api.R

Description

The Z axis or depth axis for 3D plots. See the Axis class for programmatic access to the axis.

Usage

1

Arguments

hc

A highchart htmlwidget object.

...

Arguments defined in https://api.highcharts.com/highcharts/zAxis.

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
df <- data.frame(
  x = sample(1:5),
  y = sample(1:5),
  z = sample(1:5)
)

# Note the 3d requiere highchart2() due have the 3d module
highchart2() %>%
  hc_add_series(data = df, "scatter3d", hcaes(x = x, y = y, z = z)) %>%
  hc_chart(
    type = "scatter3d",
    options3d = list(
      enabled = TRUE,
      alpha = 20,
      beta = 30,
      depth = 200,
      viewDistance = 5,
      frame = list(
        bottom = list(
          size = 1,
          color = "rgba(0,0,0,0.05)"
        )
      )
    )
  ) %>%
  hc_zAxis(
    title = list(text = "Z axis is here"),
    startOnTick = FALSE,
    tickInterval = 2,
    tickLength = 4,
    tickWidth = 1,
    gridLineColor = "red",
    gridLineDashStyle = "dot"
  )

highcharter documentation built on Jan. 3, 2022, 5:08 p.m.