hc_zAxis: Zaxis options for highcharter objects

View source: R/highcharts-api.R

hc_zAxisR Documentation

Zaxis options for highcharter objects

Description

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

Usage

hc_zAxis(hc, ...)

Arguments

hc

A highchart htmlwidget object.

...

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

Examples


df <- data.frame(
  x = sample(1:5),
  y = sample(1:5),
  z = sample(1:5)
)

highchart() |>
  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"
  )


jbkunst/highcharter documentation built on March 14, 2024, 12:52 a.m.