layerchart@2.5.2
Patch Changes
- fix(ArcChart|AreaChart|BarChart|LineChart|PieChart|ScatterChart): Support
bind:ref, andbind:contexton the.svg/.canvasvariants (#930) (#931)
bind:ref, and bind:context on the .svg / .canvas variants (#930) (#931)fix(Tooltip): Keep a flipped tooltip inside the container (or window) when flipping overflows the other edge (ex. a start-aligned tooltip wider than half a narrow chart opened past its left edge) (#924)
fix(TooltipContext): Keep a tooltip locked from onclick on touch (a tap's pointerleave precedes click, and its pending hide cleared the data under the lock), and hide it once unlocked if the pointer left while locked (#924)
seriesKey prop to fade the mark while another series is highlighted and remove it while the legend has that series hidden (#917)fix(deps): Bump @layerstack/* dependencies to fix Package subpath is not defined by exports when bundling without Vite (issue #913) (#915)
fix(Spline): Render startContent, endContent, markerStart, and markerEnd once per line rather than once per style-split segment (#914)
fix(Spline): Keep the line's color on segments split by a class, opacity, or fill function (#914)
fix(Spline): Animate segments split by a style function, which motion previously skipped (#914)
feat(Axis): Add tickOcclusion to drop ticks whose labels would overlap, measured at the size they render (including rotation), with priority of 'end' (default), 'start', or 'start-end' to choose which survive (#909)
feat(utils): Add rotate and multiline support to getTextRect, so a rotated or stacked <Text> can be measured for occlude without the caller reproducing <Text>'s pivot (#909)
fix(Area): Apply mask, filter, and clip-path to the line path as well as the fill (unless overrideden by line={{...}}) (#909)
fix(Calendar): Adjust month labels after recent Text verticalAnchor improvements (#909)
fix(Calendar): Size cells to fit monthPath, which can extend past the last cell when the range ends mid-month (#909)
perf(Chart): Measure the container before building the subtree, so marks are only built once (#909)
fix(downloadImage, downloadSvg): Inline stop-color/stop-opacity so gradients don't export as solid black (#909)
fix(Chart): Return undefined from xGet/yGet when that axis has no accessor, instead of throwing accessor is not a function (#909)
fix(Spline, Area): Animate each path when the mark is split by z, which motion previously skipped — segments split by a style function are still redrawn outright (#909)
fix(Path, Spline): Render endContent without a draw transition (#909)
perf(Chart): Resolve a plain-key accessor (x="date") directly instead of re-parsing the path string (#906)
fix(Chart): Treat an explicit but empty series array as authoritative, rather than deriving implicit series from marks (#906)
perf(Chart): Keep the value domain off the mark registry, so mounting a chart no longer rebuilds its scales — and every path drawn from them — once per mark registered (#906)
fix(Highlight): Fix crash highlighting c-grouped points over nested chart data (#906)
fix(Highlight): Mark only the hovered row in quadtree / voronoi tooltips, rather than every row sharing its position (#906)
feat(Chart): Take the color channel from a mark's own fill / stroke (<Circle fill="island">) when no c is declared (#906)
fix(Tooltip): Center on internal when data snapping (instead of on its leading edge) (#906)
fix(Tooltip): Fix persistent tooltip when rendered outside Chart container and pointerEvents is enabled (#906)
feat(ChartGroup): Add <ChartGroup> and ChartGroupState to synchronize the tooltip/highlight, brush selection, zoom domain, and series highlight/visibility across charts (#901)
feat(Chart): Add fx / fy faceting, drawing the chart once per distinct value into a grid of panels that share the position scales (#901)
feat(Chart): Add seriesLayout="auto" (default) with automatic stacking when applicable (ex. Area, Bars). Can still pass explicit seriesLayout (ex. overlap, group, stack) when needed (#901)
feat(Bar|Bars): Accept a per-row accessor for fillOpacity, strokeWidth, and opacity, matching Rect and Circle (#901)
feat(Spline|Area): Resolve stroke, fill, opacity, and class per line/area (and segment). A string naming a data property now resolves through the chart's color scale, like other primitives (ex. Circle) (#901)
feat(Chart): Default the color scale to the colors declared on series, so marks match their legend swatch (#901)
feat(Legend): Support ordinal c scale similar to series including highlight and filter capability. An ordinal scale now draws labelled swatches rather than a color ramp — pass variant="ramp" for the old appearance (#901)
feat(Tooltip): Add tooltip.show({ point, value, data }) to control tooltip programmatically (buttons, keyboard events, etc.) (#901)
feat: New Brush component to manually position, useful for multiple / independent brushes (ex. parallel coordinates). Also includes new brushable attachment and brushGesture handler for even more granular control of BrushState (#901)
feat(AnnotationPoint|AnnotationLine|AnnotationRange): Support seriesKey prop to associate an annotation with a series, positioning points and lines on its stacked segment (#901)
feat(Chart): Add id prop, applied to the root element and identifying the chart within a ChartGroup (#901)
feat(Rect): Support ref in html layers and forward pointerdown in canvas layers (#901)
feat(Spline|Area): Add z accessor to draw one line/area per distinct value, defaulting to stroke / fill / c (#901)
feat(Spline): Support seriesKey prop to follow that series' stacked top (#901)
feat(Chart): Add transform.initialDomain to open a chart zoomed to a range (#901)
fix(BrushContext): Fix clearing on double-clicking the selection (root select-all was immediately undoing) (#901)
fix(PieChart): Stop drawing a cartesian grid behind the arcs when using series (#901)
fix(Chart): Stack each x1 sub-band separately, so grouped-and-stacked bars no longer share one running total (#901)
fix(Chart): Apply zoomToBrush() when called before the chart mounts or when the scale clamps to scaleExtent (#901)
fix(Spline): Only tween path data when motion is set (~20x less memory growth while streaming, issue #585) (#896)
perf(Chart): Remove quadratic domain recalculation on mount for series-based charts (#896)
perf: Memoize props in component state classes (~3x faster <Rect> mount in benchmarks) (#896)
perf(Chart): Resolve stacked value domain in a single pass (#896)
feat(Labels): Add layout="voronoi" to place each label towards Voronoi cell's centroid, occlude to drop overlapping labels and links to move labels to centroid with a leader line back to the point. (#892)
feat(Points|Labels): Project through the chart's geo projection when present, so <Points> (and <Labels>) render on maps. (#892)
feat(Voronoi): Add children snippet exposing per-cell geometry (point, polygon, centroid, area) for custom rendering (e.g. labels). (#892)
feat(AnnotationPoint): Support explicit labelX/labelY positioning, a fontSize prop, a labelGap for callout spacing, and a labelPlacement="smart" option that auto-orients the label and terminates its callout at the label edge. (#892)
feat(GeoState): Support clipExtent: true to clip the projection to the chart dimensions ([[0, 0], [width, height]]), e.g. to trim the Sphere overflow under geoMercator. (#892)
verticalAnchor by cap-height so text sits a consistent distance from marks and aligns across the Svg, Canvas, and Html layers. placement="smart" labels now clear the point marker on all sides. (#893)