Repository navigation
v0.28.2
Fixes and one option from DataZooDE/anofox-visualization's #318 ports:
ScaleDateTime::domain(), so PlotGrid can align date axes (#207);
PlotGrid keeps each cell's own svg_attrs (#208); axis label fit leaves a
legible gap between kept tick labels (#212); a multi-geometry geom_sf row is
one mark (#213); compact relative SVG path encoding for geom_sf (#214). No API
breaks (cargo-semver-checks against v0.28.1).
Added
geom_sf's native SVG output is more compact for large boundaries
(#214): the newDrawBackend::draw_polygon_rings_precise(default
impl just forwards to the existingdraw_polygon_rings[_pattern], so
no other backend or geom changes) lets a caller ask for relative-command,
configurable-decimal-precision path data instead of absoluteM/L
2-decimal commands.GeomSfopts in automatically, tied to its own
simplify_px(1 decimal whenever simplification is on, the default);
.simplify(0.0)keeps the exact absolute encoding. Every other
draw_polygon_rings[_pattern]caller (geom_rect/geom_tile/
geom_polygon) is untouched, so their output doesn't move. Found
porting DataZooDE/anofox-visualization#420.
Fixed
check.overlapcould leave adjacent continuous x tick labels touching
(#212, upstream issue DataZooDE/anofox-visualization#450). The thinning
pass only required two kept labels' estimated bounding boxes not to
literally intersect — on a narrow panel (a dashboard card's plot area
squeezed by a right-hand legend) that could leave as little as ~1 px
between them, which on real font metrics reads as one garbled run (25
next to50as2550).draw_x_axisnow also requires one space
character's width of clearance between every pair of kept labels, not
just "don't touch" — a 0/25/50/75/100 set over a ~50 px panel now keeps
0/50/100 instead of 0/25/50/100 with a sub-pixel gap.PlotGrid::axis_collect(AxisCollect::CollectX)(#175) skipped every
column with a date x axis, warningplot_grid: a column's x scale is discrete or untrained; x domain not collectedand leaving every cell —
chart included — unaligned (#207, upstream issue
DataZooDE/anofox-visualization#422: every::TRACKfixture there uses a
date x axis).collect_x_domainreads a cell's x scale via
Scale::domain(), which defaults toNoneand is overridden by
ScaleContinuousbut wasn't byScaleDateTime(it only implemented
train()andexpanded_domain()) — so a date scale always looked
"untrained" to it, regardless of how much data it had actually trained
on.ScaleDateTime::domain()now returns its trained(min, max), same
asScaleContinuous's. Audited every other position (X/Y) scale
(ScaleContinuous,ScaleDateTime,ScaleDiscrete) for the same gap —
ScaleDiscretecorrectly has nodomain()and is excluded by
CollectX's ownis_discrete()check instead, so it needed no change.PlotGridsilently dropped each cell's ownGGPlot::svg_attr/
svg_attrsonce composed (#208, upstream issue
DataZooDE/anofox-visualization#422: every::TRACKcell'sdata-track
attribute never reached the composed SVG).prepare_plotnever carried
GGPlot::root_attrspastbuild_for_render(which consumes and drops
it), andrender_prepared's per-cell render only ever wrote
root_data_attrs+data-panelto the cell's own root<svg>. A
cell's ownsvg_attrs are now captured alongsidesvg_formatted_values
(the samebuild_for_render-discards-it problem that field already
had) and applied — allow-listed and collision-checked exactly as a
lone plot's or the grid's own, via the samevalidate_root_attrs— on
a<g>wrapping that cell's content, so they don't collide with
ggplot-rs's own per-cell root attributes or the grid's ownsvg_attrs
on the grid's root. A cell with nosvg_attrcall gets no<g>
wrapper at all — unaffected output.geom_sf(#213): aMultiPolygonrow now draws as one mark — one
<path>with oneM…Zsubpath per ring and part under the even-odd
fill rule, one set of row attributes/data-*, one tooltip — instead of
one separate mark per part (a country with islands no longer produces
N marks sharing the samedata-row). Single-Polygonoutput is
unchanged. Found porting DataZooDE/anofox-visualization#420.