g2: g2

View source: R/rg2.R

g2R Documentation

g2

Description

g2() create an G2 options

Usage

g2(data, encode = NULL, ..., width = 640, height = 480)

Arguments

data

required. Data Frame, URL of json/csv, for liquid data is a number, for gauge data is ⁠list(value=list(target=200, total=400, percent=0.5,thresholds=c(...) name="score"))⁠

encode

encode

...

Other arguments passed on to methods. Not currently used.

width

optional default: 640

height

optional default: 480

type

view/spaceLayer/spaceFlex/facetCircle/facetRect/repeatMatrix

Details

Spec: https://g2.antv.antgroup.com/en/spec/overview

Examples

g2_point(mtcars, 'drat', 'wt')


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