Skip to contents

Main entry

Convert a ggplot to an interactive D3 widget.

gg2d3()
Render a ggplot as a D3 widget

Interactivity

Composable interactivity layers (pipe with |>).

d3_tooltip()
Add tooltips to gg2d3 widget
d3_hover()
Add hover effects to gg2d3 widget
d3_zoom()
Add zoom and pan to gg2d3 widget
d3_brush()
Add brush selection to gg2d3 widget
d3_handlers()
Add custom JavaScript event handlers to the plot
d3_transitions()
Configure D3 transitions for the widget

Internals

Lower-level functions exposed for advanced use and testing.

as_d3_ir()
Build a D3-ready IR (intermediate representation) from a ggplot
validate_ir()
Validate the structure of a D3 intermediate representation
detect_dominant_geom_type()
Detect the dominant geometry type in an sf layer
extract_sf_geometries()
Extract sf geometries from ggplot_build layer data as GeoJSON strings
get_layer_crs()
Get CRS information from an sf layer's geometry column
normalize_to_wgs84()
Normalize an sfc column to WGS84 (EPSG:4326)