Learn R Programming

myIO (version 1.2.0)

addIoLayer: Add a Layer to a myIO Chart

Description

Adds individual layer to a myIO widget

Usage

addIoLayer(
  myIO,
  type,
  color = NULL,
  label,
  data = NULL,
  mapping,
  transform = "identity",
  options = list(barSize = "large", toolTipOptions = list(suppressY = FALSE))
)

Value

A modified myIO htmlwidget object with the new layer appended to the configuration.

Arguments

myIO

an htmlwidget object created by the myIO() function

type

chart type

color

optional CSS color string or vector for grouped layers

label

unique layer label

data

data frame backing the layer

mapping

named aesthetic mapping list

transform

transform name applied before serialization

options

layer options passed through to the widget config

Examples

Run this code
myIO(data = mtcars) |>
  addIoLayer(
    type = "point", label = "points",
    mapping = list(x_var = "wt", y_var = "mpg")
  )

Run the code above in your browser using DataLab