lc_scatter: Visualize a set of points

Description Usage Arguments Functions Available properties Examples

View source: R/lc.R

Description

These functions plot a set of points with known coordinates that can be either categorical, or continuous.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
lc_scatter(
  data = list(),
  place = NULL,
  ...,
  chartId = NULL,
  layerId = NULL,
  with = NULL,
  addLayer = FALSE,
  pacerStep = 50
)

lc_beeswarm(
  data = list(),
  place = NULL,
  ...,
  chartId = NULL,
  layerId = NULL,
  with = NULL,
  addLayer = FALSE,
  pacerStep = 50
)

Arguments

data

Name-value pairs of properties passed through the dat function. These properties will be re-evaluated on each updateCharts call.

place

An ID of the container, where to place new chart. It will be ignored if the chart already exists. If not defined, the chart will be appended to the web page's body.

...

Name-value pairs of properties that will be evaluated only once and then will remain constant. These properties can still be changed later using the setProperties function.

chartId

An ID for the chart. All charts must have unique IDs. If a chart with the same ID already exists, it will be replaced unless addLayer = TRUE. If ID is not defined, it will be the same as the value of the place argument. And if both are not defined, the ID will be set to ChartN, where N - 1 is the number of existing charts.

layerId

An ID for the new layer. All layers within one chart must have different IDs. If a layer with the same ID already exists, it will be replaced. If not defined, it will be set to LayerN, where N - 1 is the current number of layers in this chart.

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.

addLayer

If there is already a chart with the same ID, this argument defines whether to replace it or to add a new layer to it. This argument is ignored if both place and chartId are NULL or if there is no chart with the given ID.

pacerStep

Time in ms between two consecutive calls of an onmouseover event. Prevents over-queueing in case of cumbersome computations. May be important when the chart works in canvas mode.

Functions

Available properties

You can read more about different properties here.

Colour and shape settings

Axes settings

Interactivity settings

Legend settings

Global chart settings

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data("iris")
lc_scatter(dat(x = Sepal.Length, 
               y = Petal.Length,
               colourValue = Petal.Width,
               symbolValue = Species),
           with = iris,
           title = "Iris dataset",
           axisTitleY = "Petal Length",
           axisTitleX = "Sepal Length",
           colourLegendTitle = "Petal Width",
           symbolLegendTitle = "Species")

lc_beeswarm(dat(x = iris$Species,
                y = iris$Sepal.Length,
                colourValue = iris$Sepal.Width),
            title = "Iris dataset",
            axisTitleY = "Sepal Length",
            axisTitleX = "Species",
            colourLegendTitle = "Sepal Width")

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