Skip to contents

gg2d3 supports ordinary geom_polygon() as grouped closed SVG paths, ordinary geom_label() as bounded SVG label groups, geom_rect() and geom_tile() edge behavior for the shipped Cartesian scale and panel-clipping contract, and geom_sf() polygon-family (POLYGON, MULTIPOLYGON), point-family (POINT, MULTIPOINT), and line-family (LINESTRING, MULTILINESTRING) layers. geom_sf_text() and geom_sf_label() render labels at projected anchors aligned with the existing sf panel projection.

Usage

gg2d3(x, width = NULL, height = NULL, elementId = NULL)

Arguments

x

ggplot object or IR list from as_d3_ir()

width

Optional widget width passed to htmlwidgets.

height

Optional widget height passed to htmlwidgets.

elementId

Optional htmlwidgets element id.

Details

Detailed caveats for polygon topology, rect/tile transformed-scale behavior, ordinary label placement, sf annotation placement, path-following text, and map anti-features are tracked in vignettes/d3-drawing-diagnostics.md. v1.13 browser validation is R/testthat/chromote based and may skip cleanly when optional local tooling is unavailable.