setProperties: Set properties of the chart

Description Usage Arguments Examples

View source: R/lc.R

Description

Sets or resets properties for an existing chart. Changes will be applied to all currently opened and future pages. This function is a wrapper around method setProperties of class LCApp.

Usage

1
setProperties(data, chartId, layerId = NULL, with = NULL)

Arguments

data

List of properties to be redefined for this layer or chart. Created by the dat function.

chartId

ID of the chart, for which to redefine properties.

layerId

ID of the layer, for which to redefine properties. If the chart has a single layer or doesn't have layers, default value (which is NULL) can be used.

with

A dataset or a list from which other properties should be taken. If the dataset doesn't have a column with the requested name, the variable will be searched for outside of the dataset. Must be a data.frame or a list.

Examples

1
2
3
4
5
6
7
8
9
data("iris")
lc_scatter(dat(x = iris$Sepal.Length, y = iris$Sepal.Width), chartId = "irisScatter")
setProperties(dat(symbolValue = iris$Species, y = iris$Petal.Length), chartId = "irisScatter")
updateCharts("irisScatter")

lc_line(dat(x = iris$Sepal.Length, y = iris$Petal.Length), chartId = "irisScatter", 
        layerId = "line")
setProperties(dat(colour = "red"), chartId = "irisScatter", layerId = "line")
updateCharts("irisScatter")

rlc documentation built on Jan. 5, 2022, 1:11 a.m.