spec: Spec

specR Documentation

Spec

Description

G2 designed a spec to describe the visualizations that can be drawn, which allows users to render charts by calling chart.options(options) with specified options that meet the specification.

Details

Mark

g2_ family make marks

Transform

The Mark Transform in G2 offers a convenient method for transforming data and mark options, mainly used for analyzing data. The core of mark transform, which filters, modifies, aggregates and generates new channel values.

Transform is an array, executed in the order when they are declared. It can be configured in mark:

g2_col(transform=list(list(type='stackY'), list(type='sortX')))
g2_col(transform=list(list(type='stackY')))

13kay/rg2 documentation built on June 25, 2024, 7:26 a.m.