facet: Facet a chart

Description Usage Arguments

Description

Chart facet.

Usage

1

Arguments

type

One of "rect", "list", "tree", "mirror", or "matrix" specifying the type or style of faceting.

分面类型,现支持的类型为:rect, list, tree, mirror, matrix。

fields

A character vector specifying the fields to facet on.

设置分面的字段,用于划分数据集。

showTitle

TRUE or FALSE, defaults to TRUE.

是否显示分面的标题,默认为 true,即展示。

autoSetAxis

TRUE or FALSE, defaults to TRUE.

是否自动设置坐标轴的文本,避免重复和遮挡,默认为 true,即自动设置。

padding

A number or numeric vector.

设置每个 view 之间的间距。padding 是view 的内部边距,所以不会影响布局。

eachView

A function of two arguments view and facet, returns NULL.

回调函数,用于绘制每一个分面对应 view。该回调函数的内容如下:

colTitle

A list specifying styles for column titles,

colTitle: {
  offsetY: -15, // 列标题垂直方向的偏移
  style: {
    fontSize: 14,
    textAlign: 'center',
    fill: '#444'
  } // 标题文本样式
}
rowTitle

A list specifying styles for row titles,

rowTitle: {
  offsetX: -15, // 列标题水平方向的偏移
  style: {
    fontSize: 14,
    textAlign: 'center',
    fill: '#444'
  } // 标题文本样式
}

nteetor/golly documentation built on May 16, 2019, 8:12 p.m.