@sophistry/charts 0.0.0-stage → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +32 -2
- package/dist/3d/bar-chart3d.d.ts +56 -0
- package/dist/3d/bar-chart3d.d.ts.map +1 -0
- package/dist/3d/definitions.d.ts +38 -0
- package/dist/3d/definitions.d.ts.map +1 -0
- package/dist/3d/definitions.js +14 -0
- package/dist/3d/forward.d.ts +65 -0
- package/dist/3d/forward.d.ts.map +1 -0
- package/dist/3d/index.d.ts +31 -0
- package/dist/3d/index.d.ts.map +1 -0
- package/dist/3d/index.js +1 -0
- package/dist/3d/quiver3d.d.ts +53 -0
- package/dist/3d/quiver3d.d.ts.map +1 -0
- package/dist/3d/scatter3d.d.ts +45 -0
- package/dist/3d/scatter3d.d.ts.map +1 -0
- package/dist/3d/stem3d.d.ts +46 -0
- package/dist/3d/stem3d.d.ts.map +1 -0
- package/dist/3d/surface-grid3d.d.ts +34 -0
- package/dist/3d/surface-grid3d.d.ts.map +1 -0
- package/dist/3d/tri-surface3d.d.ts +46 -0
- package/dist/3d/tri-surface3d.d.ts.map +1 -0
- package/dist/3d/voxels3d.d.ts +26 -0
- package/dist/3d/voxels3d.d.ts.map +1 -0
- package/dist/3d/wireframe3d.d.ts +31 -0
- package/dist/3d/wireframe3d.d.ts.map +1 -0
- package/dist/band.d.ts +21 -0
- package/dist/band.d.ts.map +1 -0
- package/dist/bars/bar-chart.d.ts +144 -0
- package/dist/bars/bar-chart.d.ts.map +1 -0
- package/dist/bars/bar-labels.d.ts +117 -0
- package/dist/bars/bar-labels.d.ts.map +1 -0
- package/dist/bars/bars.d.ts +224 -0
- package/dist/bars/bars.d.ts.map +1 -0
- package/dist/bars/bullet.d.ts +158 -0
- package/dist/bars/bullet.d.ts.map +1 -0
- package/dist/bars/candlestick.d.ts +98 -0
- package/dist/bars/candlestick.d.ts.map +1 -0
- package/dist/bars/funnel.d.ts +91 -0
- package/dist/bars/funnel.d.ts.map +1 -0
- package/dist/bars/histogram.d.ts +109 -0
- package/dist/bars/histogram.d.ts.map +1 -0
- package/dist/bars/index.d.ts +23 -0
- package/dist/bars/index.d.ts.map +1 -0
- package/dist/bars/race.d.ts +29 -0
- package/dist/bars/race.d.ts.map +1 -0
- package/dist/bars/rules.d.ts +122 -0
- package/dist/bars/rules.d.ts.map +1 -0
- package/dist/bars/shared.d.ts +42 -0
- package/dist/bars/shared.d.ts.map +1 -0
- package/dist/bars/transforms.d.ts +250 -0
- package/dist/bars/transforms.d.ts.map +1 -0
- package/dist/bars/waterfall.d.ts +107 -0
- package/dist/bars/waterfall.d.ts.map +1 -0
- package/dist/batch.d.ts +143 -0
- package/dist/batch.d.ts.map +1 -0
- package/dist/channels-_Xf-p6Lx.js +56 -0
- package/dist/chart.d.ts +88 -0
- package/dist/chart.d.ts.map +1 -0
- package/dist/color-norm.d.ts +91 -0
- package/dist/color-norm.d.ts.map +1 -0
- package/dist/context.d.ts +112 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/curves/density.d.ts +126 -0
- package/dist/curves/density.d.ts.map +1 -0
- package/dist/curves/ecdf.d.ts +73 -0
- package/dist/curves/ecdf.d.ts.map +1 -0
- package/dist/curves/fill-between.d.ts +101 -0
- package/dist/curves/fill-between.d.ts.map +1 -0
- package/dist/curves/index.d.ts +16 -0
- package/dist/curves/index.d.ts.map +1 -0
- package/dist/curves/line-plot.d.ts +105 -0
- package/dist/curves/line-plot.d.ts.map +1 -0
- package/dist/curves/regression.d.ts +125 -0
- package/dist/curves/regression.d.ts.map +1 -0
- package/dist/curves/shared.d.ts +53 -0
- package/dist/curves/shared.d.ts.map +1 -0
- package/dist/curves/stack-plot.d.ts +141 -0
- package/dist/curves/stack-plot.d.ts.map +1 -0
- package/dist/curves/stairs.d.ts +171 -0
- package/dist/curves/stairs.d.ts.map +1 -0
- package/dist/data/channels.d.ts +171 -0
- package/dist/data/channels.d.ts.map +1 -0
- package/dist/end-space.d.ts +82 -0
- package/dist/end-space.d.ts.map +1 -0
- package/dist/entries/definitions.d.ts +21 -0
- package/dist/entries/definitions.d.ts.map +1 -0
- package/dist/entries/definitions.js +6 -0
- package/dist/frame/band-axis.d.ts +43 -0
- package/dist/frame/band-axis.d.ts.map +1 -0
- package/dist/frame/coords.d.ts +112 -0
- package/dist/frame/coords.d.ts.map +1 -0
- package/dist/frame/fit.d.ts +171 -0
- package/dist/frame/fit.d.ts.map +1 -0
- package/dist/frame/format.d.ts +41 -0
- package/dist/frame/format.d.ts.map +1 -0
- package/dist/frame/guide-metrics.d.ts +37 -0
- package/dist/frame/guide-metrics.d.ts.map +1 -0
- package/dist/frame/guides.d.ts +68 -0
- package/dist/frame/guides.d.ts.map +1 -0
- package/dist/frame/keys.d.ts +97 -0
- package/dist/frame/keys.d.ts.map +1 -0
- package/dist/frame/layout.d.ts +146 -0
- package/dist/frame/layout.d.ts.map +1 -0
- package/dist/frame/registry.d.ts +32 -0
- package/dist/frame/registry.d.ts.map +1 -0
- package/dist/frame/reports.d.ts +54 -0
- package/dist/frame/reports.d.ts.map +1 -0
- package/dist/frame/secondary-axes.d.ts +74 -0
- package/dist/frame/secondary-axes.d.ts.map +1 -0
- package/dist/frame/secondary.d.ts +57 -0
- package/dist/frame/secondary.d.ts.map +1 -0
- package/dist/frame/tooltip-overlay.d.ts +65 -0
- package/dist/frame/tooltip-overlay.d.ts.map +1 -0
- package/dist/frame/types.d.ts +659 -0
- package/dist/frame/types.d.ts.map +1 -0
- package/dist/grids/barbs.d.ts +52 -0
- package/dist/grids/barbs.d.ts.map +1 -0
- package/dist/grids/cell-rects.d.ts +38 -0
- package/dist/grids/cell-rects.d.ts.map +1 -0
- package/dist/grids/cells.d.ts +131 -0
- package/dist/grids/cells.d.ts.map +1 -0
- package/dist/grids/contour-f.d.ts +81 -0
- package/dist/grids/contour-f.d.ts.map +1 -0
- package/dist/grids/contour-shared.d.ts +54 -0
- package/dist/grids/contour-shared.d.ts.map +1 -0
- package/dist/grids/contour.d.ts +85 -0
- package/dist/grids/contour.d.ts.map +1 -0
- package/dist/grids/dendrogram.d.ts +105 -0
- package/dist/grids/dendrogram.d.ts.map +1 -0
- package/dist/grids/heatmap.d.ts +164 -0
- package/dist/grids/heatmap.d.ts.map +1 -0
- package/dist/grids/hex-bin.d.ts +94 -0
- package/dist/grids/hex-bin.d.ts.map +1 -0
- package/dist/grids/hist2d.d.ts +108 -0
- package/dist/grids/hist2d.d.ts.map +1 -0
- package/dist/grids/imshow.d.ts +85 -0
- package/dist/grids/imshow.d.ts.map +1 -0
- package/dist/grids/index.d.ts +27 -0
- package/dist/grids/index.d.ts.map +1 -0
- package/dist/grids/pcolormesh.d.ts +91 -0
- package/dist/grids/pcolormesh.d.ts.map +1 -0
- package/dist/grids/ramp-cells.d.ts +67 -0
- package/dist/grids/ramp-cells.d.ts.map +1 -0
- package/dist/grids/tri-contour.d.ts +121 -0
- package/dist/grids/tri-contour.d.ts.map +1 -0
- package/dist/grids/tri-shared.d.ts +62 -0
- package/dist/grids/tri-shared.d.ts.map +1 -0
- package/dist/grids/tripcolor.d.ts +74 -0
- package/dist/grids/tripcolor.d.ts.map +1 -0
- package/dist/guides/colorbar.d.ts +111 -0
- package/dist/guides/colorbar.d.ts.map +1 -0
- package/dist/guides/index.d.ts +12 -0
- package/dist/guides/index.d.ts.map +1 -0
- package/dist/guides/legend.d.ts +119 -0
- package/dist/guides/legend.d.ts.map +1 -0
- package/dist/guides/nodes.d.ts +14 -0
- package/dist/guides/nodes.d.ts.map +1 -0
- package/dist/guides/size-legend.d.ts +234 -0
- package/dist/guides/size-legend.d.ts.map +1 -0
- package/dist/hierarchy/breadcrumbs.d.ts +134 -0
- package/dist/hierarchy/breadcrumbs.d.ts.map +1 -0
- package/dist/hierarchy/circle-pack.d.ts +73 -0
- package/dist/hierarchy/circle-pack.d.ts.map +1 -0
- package/dist/hierarchy/drill.d.ts +246 -0
- package/dist/hierarchy/drill.d.ts.map +1 -0
- package/dist/hierarchy/frame.d.ts +68 -0
- package/dist/hierarchy/frame.d.ts.map +1 -0
- package/dist/hierarchy/icicle.d.ts +77 -0
- package/dist/hierarchy/icicle.d.ts.map +1 -0
- package/dist/hierarchy/index.d.ts +21 -0
- package/dist/hierarchy/index.d.ts.map +1 -0
- package/dist/hierarchy/labels.d.ts +25 -0
- package/dist/hierarchy/labels.d.ts.map +1 -0
- package/dist/hierarchy/mosaic.d.ts +131 -0
- package/dist/hierarchy/mosaic.d.ts.map +1 -0
- package/dist/hierarchy/own-tooltip.d.ts +13 -0
- package/dist/hierarchy/own-tooltip.d.ts.map +1 -0
- package/dist/hierarchy/props.d.ts +14 -0
- package/dist/hierarchy/props.d.ts.map +1 -0
- package/dist/hierarchy/sankey.d.ts +133 -0
- package/dist/hierarchy/sankey.d.ts.map +1 -0
- package/dist/hierarchy/shared.d.ts +248 -0
- package/dist/hierarchy/shared.d.ts.map +1 -0
- package/dist/hierarchy/sunburst.d.ts +75 -0
- package/dist/hierarchy/sunburst.d.ts.map +1 -0
- package/dist/hierarchy/tree.d.ts +125 -0
- package/dist/hierarchy/tree.d.ts.map +1 -0
- package/dist/hierarchy/treemap.d.ts +77 -0
- package/dist/hierarchy/treemap.d.ts.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/item-tooltip.d.ts +34 -0
- package/dist/item-tooltip.d.ts.map +1 -0
- package/dist/join.d.ts +224 -0
- package/dist/join.d.ts.map +1 -0
- package/dist/math/3d/bar3d.d.ts +28 -0
- package/dist/math/3d/bar3d.d.ts.map +1 -0
- package/dist/math/3d/quiver3d.d.ts +27 -0
- package/dist/math/3d/quiver3d.d.ts.map +1 -0
- package/dist/math/3d/scatter3d.d.ts +16 -0
- package/dist/math/3d/scatter3d.d.ts.map +1 -0
- package/dist/math/3d/stem3d.d.ts +23 -0
- package/dist/math/3d/stem3d.d.ts.map +1 -0
- package/dist/math/3d/surfaceGrid3d.d.ts +34 -0
- package/dist/math/3d/surfaceGrid3d.d.ts.map +1 -0
- package/dist/math/3d/trisurface.d.ts +12 -0
- package/dist/math/3d/trisurface.d.ts.map +1 -0
- package/dist/math/3d/voxels.d.ts +18 -0
- package/dist/math/3d/voxels.d.ts.map +1 -0
- package/dist/math/aggregate.d.ts +69 -0
- package/dist/math/aggregate.d.ts.map +1 -0
- package/dist/math/bar.d.ts +32 -0
- package/dist/math/bar.d.ts.map +1 -0
- package/dist/math/barLabels.d.ts +84 -0
- package/dist/math/barLabels.d.ts.map +1 -0
- package/dist/math/barbs.d.ts +37 -0
- package/dist/math/barbs.d.ts.map +1 -0
- package/dist/math/boxplot.d.ts +37 -0
- package/dist/math/boxplot.d.ts.map +1 -0
- package/dist/math/breadcrumbs.d.ts +129 -0
- package/dist/math/breadcrumbs.d.ts.map +1 -0
- package/dist/math/bubble.d.ts +39 -0
- package/dist/math/bubble.d.ts.map +1 -0
- package/dist/math/bullet.d.ts +111 -0
- package/dist/math/bullet.d.ts.map +1 -0
- package/dist/math/chord.d.ts +104 -0
- package/dist/math/chord.d.ts.map +1 -0
- package/dist/math/cluster.d.ts +89 -0
- package/dist/math/cluster.d.ts.map +1 -0
- package/dist/math/contour.d.ts +49 -0
- package/dist/math/contour.d.ts.map +1 -0
- package/dist/math/contourf.d.ts +51 -0
- package/dist/math/contourf.d.ts.map +1 -0
- package/dist/math/dodge.d.ts +37 -0
- package/dist/math/dodge.d.ts.map +1 -0
- package/dist/math/ecdf.d.ts +42 -0
- package/dist/math/ecdf.d.ts.map +1 -0
- package/dist/math/errorbar.d.ts +28 -0
- package/dist/math/errorbar.d.ts.map +1 -0
- package/dist/math/eventplot.d.ts +27 -0
- package/dist/math/eventplot.d.ts.map +1 -0
- package/dist/math/facet.d.ts +91 -0
- package/dist/math/facet.d.ts.map +1 -0
- package/dist/math/fillBetween.d.ts +29 -0
- package/dist/math/fillBetween.d.ts.map +1 -0
- package/dist/math/gauge.d.ts +72 -0
- package/dist/math/gauge.d.ts.map +1 -0
- package/dist/math/hexbin.d.ts +21 -0
- package/dist/math/hexbin.d.ts.map +1 -0
- package/dist/math/hierarchy.d.ts +180 -0
- package/dist/math/hierarchy.d.ts.map +1 -0
- package/dist/math/hierarchyJoin.d.ts +60 -0
- package/dist/math/hierarchyJoin.d.ts.map +1 -0
- package/dist/math/histogram.d.ts +37 -0
- package/dist/math/histogram.d.ts.map +1 -0
- package/dist/math/histogram2d.d.ts +45 -0
- package/dist/math/histogram2d.d.ts.map +1 -0
- package/dist/math/imshow.d.ts +27 -0
- package/dist/math/imshow.d.ts.map +1 -0
- package/dist/math/index.d.ts +140 -0
- package/dist/math/index.d.ts.map +1 -0
- package/dist/math/index.js +3 -0
- package/dist/math/jitter.d.ts +17 -0
- package/dist/math/jitter.d.ts.map +1 -0
- package/dist/math/join.d.ts +136 -0
- package/dist/math/join.d.ts.map +1 -0
- package/dist/math/keyframes.d.ts +128 -0
- package/dist/math/keyframes.d.ts.map +1 -0
- package/dist/math/legend.d.ts +121 -0
- package/dist/math/legend.d.ts.map +1 -0
- package/dist/math/line.d.ts +54 -0
- package/dist/math/line.d.ts.map +1 -0
- package/dist/math/morph.d.ts +82 -0
- package/dist/math/morph.d.ts.map +1 -0
- package/dist/math/mosaic.d.ts +120 -0
- package/dist/math/mosaic.d.ts.map +1 -0
- package/dist/math/ordinal.d.ts +80 -0
- package/dist/math/ordinal.d.ts.map +1 -0
- package/dist/math/parallel.d.ts +39 -0
- package/dist/math/parallel.d.ts.map +1 -0
- package/dist/math/pcolormesh.d.ts +23 -0
- package/dist/math/pcolormesh.d.ts.map +1 -0
- package/dist/math/pie.d.ts +106 -0
- package/dist/math/pie.d.ts.map +1 -0
- package/dist/math/polarArea.d.ts +35 -0
- package/dist/math/polarArea.d.ts.map +1 -0
- package/dist/math/radar.d.ts +111 -0
- package/dist/math/radar.d.ts.map +1 -0
- package/dist/math/range.d.ts +99 -0
- package/dist/math/range.d.ts.map +1 -0
- package/dist/math/regression.d.ts +110 -0
- package/dist/math/regression.d.ts.map +1 -0
- package/dist/math/reveal.d.ts +64 -0
- package/dist/math/reveal.d.ts.map +1 -0
- package/dist/math/sankey.d.ts +155 -0
- package/dist/math/sankey.d.ts.map +1 -0
- package/dist/math/scatter.d.ts +15 -0
- package/dist/math/scatter.d.ts.map +1 -0
- package/dist/math/shared/binning.d.ts +24 -0
- package/dist/math/shared/binning.d.ts.map +1 -0
- package/dist/math/shared/gridCells.d.ts +42 -0
- package/dist/math/shared/gridCells.d.ts.map +1 -0
- package/dist/math/shared/gridExtent.d.ts +6 -0
- package/dist/math/shared/gridExtent.d.ts.map +1 -0
- package/dist/math/shared/pairs.d.ts +3 -0
- package/dist/math/shared/pairs.d.ts.map +1 -0
- package/dist/math/shared/polar.d.ts +24 -0
- package/dist/math/shared/polar.d.ts.map +1 -0
- package/dist/math/stack.d.ts +70 -0
- package/dist/math/stack.d.ts.map +1 -0
- package/dist/math/stackplot.d.ts +36 -0
- package/dist/math/stackplot.d.ts.map +1 -0
- package/dist/math/stairs.d.ts +18 -0
- package/dist/math/stairs.d.ts.map +1 -0
- package/dist/math/stem.d.ts +22 -0
- package/dist/math/stem.d.ts.map +1 -0
- package/dist/math/symbol.d.ts +26 -0
- package/dist/math/symbol.d.ts.map +1 -0
- package/dist/math/tree.d.ts +118 -0
- package/dist/math/tree.d.ts.map +1 -0
- package/dist/math/tricontour.d.ts +77 -0
- package/dist/math/tricontour.d.ts.map +1 -0
- package/dist/math/violin.d.ts +100 -0
- package/dist/math/violin.d.ts.map +1 -0
- package/dist/math/waffle.d.ts +49 -0
- package/dist/math/waffle.d.ts.map +1 -0
- package/dist/math/waterfall.d.ts +29 -0
- package/dist/math/waterfall.d.ts.map +1 -0
- package/dist/math-CSHNpGej.js +3648 -0
- package/dist/mix.d.ts +25 -0
- package/dist/mix.d.ts.map +1 -0
- package/dist/multiview/brush.d.ts +166 -0
- package/dist/multiview/brush.d.ts.map +1 -0
- package/dist/multiview/chart-group.d.ts +266 -0
- package/dist/multiview/chart-group.d.ts.map +1 -0
- package/dist/multiview/chart-link.d.ts +189 -0
- package/dist/multiview/chart-link.d.ts.map +1 -0
- package/dist/multiview/chart-zoom.d.ts +145 -0
- package/dist/multiview/chart-zoom.d.ts.map +1 -0
- package/dist/multiview/facet.d.ts +239 -0
- package/dist/multiview/facet.d.ts.map +1 -0
- package/dist/multiview/group-guides.d.ts +100 -0
- package/dist/multiview/group-guides.d.ts.map +1 -0
- package/dist/multiview/index.d.ts +18 -0
- package/dist/multiview/index.d.ts.map +1 -0
- package/dist/multiview/joint-plot.d.ts +115 -0
- package/dist/multiview/joint-plot.d.ts.map +1 -0
- package/dist/multiview/pair-plot.d.ts +154 -0
- package/dist/multiview/pair-plot.d.ts.map +1 -0
- package/dist/multiview/panels.d.ts +23 -0
- package/dist/multiview/panels.d.ts.map +1 -0
- package/dist/multiview/parallel-coordinates.d.ts +110 -0
- package/dist/multiview/parallel-coordinates.d.ts.map +1 -0
- package/dist/points/event-plot.d.ts +68 -0
- package/dist/points/event-plot.d.ts.map +1 -0
- package/dist/points/index.d.ts +20 -0
- package/dist/points/index.d.ts.map +1 -0
- package/dist/points/labels.d.ts +71 -0
- package/dist/points/labels.d.ts.map +1 -0
- package/dist/points/links.d.ts +124 -0
- package/dist/points/links.d.ts.map +1 -0
- package/dist/points/rects.d.ts +81 -0
- package/dist/points/rects.d.ts.map +1 -0
- package/dist/points/rug.d.ts +73 -0
- package/dist/points/rug.d.ts.map +1 -0
- package/dist/points/scatter.d.ts +170 -0
- package/dist/points/scatter.d.ts.map +1 -0
- package/dist/points/segment-marks.d.ts +40 -0
- package/dist/points/segment-marks.d.ts.map +1 -0
- package/dist/points/shared.d.ts +35 -0
- package/dist/points/shared.d.ts.map +1 -0
- package/dist/points/stem.d.ts +76 -0
- package/dist/points/stem.d.ts.map +1 -0
- package/dist/points/strip.d.ts +146 -0
- package/dist/points/strip.d.ts.map +1 -0
- package/dist/points/symbol-marker.d.ts +34 -0
- package/dist/points/symbol-marker.d.ts.map +1 -0
- package/dist/points/ticks.d.ts +103 -0
- package/dist/points/ticks.d.ts.map +1 -0
- package/dist/props.d.ts +127 -0
- package/dist/props.d.ts.map +1 -0
- package/dist/radial/chord.d.ts +149 -0
- package/dist/radial/chord.d.ts.map +1 -0
- package/dist/radial/gauge.d.ts +127 -0
- package/dist/radial/gauge.d.ts.map +1 -0
- package/dist/radial/index.d.ts +16 -0
- package/dist/radial/index.d.ts.map +1 -0
- package/dist/radial/pie-chart.d.ts +144 -0
- package/dist/radial/pie-chart.d.ts.map +1 -0
- package/dist/radial/polar-area-chart.d.ts +136 -0
- package/dist/radial/polar-area-chart.d.ts.map +1 -0
- package/dist/radial/radar-chart.d.ts +177 -0
- package/dist/radial/radar-chart.d.ts.map +1 -0
- package/dist/radial/radial-bar-chart.d.ts +117 -0
- package/dist/radial/radial-bar-chart.d.ts.map +1 -0
- package/dist/radial/shared.d.ts +79 -0
- package/dist/radial/shared.d.ts.map +1 -0
- package/dist/radial/waffle.d.ts +131 -0
- package/dist/radial/waffle.d.ts.map +1 -0
- package/dist/raster.d.ts +44 -0
- package/dist/raster.d.ts.map +1 -0
- package/dist/series.d.ts +72 -0
- package/dist/series.d.ts.map +1 -0
- package/dist/src-CwGo1bes.js +19221 -0
- package/dist/stagger.d.ts +55 -0
- package/dist/stagger.d.ts.map +1 -0
- package/dist/statistics/box-plot.d.ts +152 -0
- package/dist/statistics/box-plot.d.ts.map +1 -0
- package/dist/statistics/error-bar.d.ts +149 -0
- package/dist/statistics/error-bar.d.ts.map +1 -0
- package/dist/statistics/groups.d.ts +141 -0
- package/dist/statistics/groups.d.ts.map +1 -0
- package/dist/statistics/index.d.ts +8 -0
- package/dist/statistics/index.d.ts.map +1 -0
- package/dist/statistics/violin-plot.d.ts +144 -0
- package/dist/statistics/violin-plot.d.ts.map +1 -0
- package/dist/text-width.d.ts +10 -0
- package/dist/text-width.d.ts.map +1 -0
- package/dist/tooltip.d.ts +277 -0
- package/dist/tooltip.d.ts.map +1 -0
- package/dist/util.d.ts +34 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/voxels-9lJ2TZS4.js +235 -0
- package/dist/wireframe3d-D157GZAq.js +345 -0
- package/package.json +86 -3
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { $ as e, $t as t, A as n, An as r, At as i, B as a, Bn as o, Bt as s, C as c, Cn as l, Ct as u, D as d, Dn as f, Dt as p, E as m, En as h, Et as g, F as _, Fn as v, Ft as y, G as b, Gn as x, Gt as S, H as C, Hn as w, Ht as T, I as E, In as D, It as O, J as k, Jt as A, K as j, Kn as M, Kt as N, L as P, Ln as F, Lt as I, M as L, Mn as R, Mt as z, N as B, Nn as V, Nt as H, O as U, On as W, Ot as G, P as K, Pn as q, Pt as J, Q as Y, Qt as X, R as Z, Rn as Q, Rt as $, S as ee, Sn as te, St as ne, T as re, Tn as ie, Tt as ae, U as oe, Un as se, Ut as ce, V as le, Vn as ue, Vt as de, W as fe, Wn as pe, Wt as me, X as he, Xt as ge, Y as _e, Yt as ve, Z as ye, Zt as be, _ as xe, _n as Se, _t as Ce, a as we, an as Te, at as Ee, b as De, bn as Oe, bt as ke, c as Ae, cn as je, ct as Me, d as Ne, dn as Pe, dt as Fe, en as Ie, et as Le, f as Re, fn as ze, ft as Be, g as Ve, gn as He, gt as Ue, h as We, hn as Ge, ht as Ke, i as qe, in as Je, it as Ye, j as Xe, jn as Ze, jt as Qe, k as $e, kn as et, kt as tt, l as nt, ln as rt, lt as it, m as at, mn as ot, mt as st, n as ct, nn as lt, nt as ut, o as dt, on as ft, ot as pt, p as mt, pn as ht, pt as gt, q as _t, qt as vt, r as yt, rn as bt, rt as xt, s as St, sn as Ct, st as wt, t as Tt, tn as Et, tt as Dt, u as Ot, un as kt, ut as At, v as jt, vn as Mt, vt as Nt, w as Pt, wn as Ft, wt as It, x as Lt, xn as Rt, xt as zt, y as Bt, yn as Vt, yt as Ht, z as Ut, zn as Wt, zt as Gt } from "../math-CSHNpGej.js";
|
|
2
|
+
import { a as Kt, i as qt, n as Jt, o as Yt, r as Xt, s as Zt, t as Qt } from "../voxels-9lJ2TZS4.js";
|
|
3
|
+
export { Ht as DECIMATION_MIN_PER_COLUMN, He as DEFAULT_BAR_WIDTH, lt as DEFAULT_BIN_COUNT, p as DEFAULT_ECDF_PAD_FALLBACK, G as DEFAULT_ECDF_PAD_FRACTION, i as DEFAULT_SAMPLES, Qe as DEFAULT_VIOLIN_SCALE, B as DEFAULT_WHISKER_SCALE, jt as GAUGE_END_ANGLE, Bt as GAUGE_START_ANGLE, kt as INSIDE_LABEL_FADE, f as SYMBOLS, Ze as alignedRange, yt as assertRadarShape, R as autoRange, Zt as bar3dSlots, Pe as barLabelValues, Se as barSlot, Ce as barbGlyph, Te as beeswarmOffsets, Je as binIndex, z as blendViolinProfiles, K as boxplotStats, _t as breadcrumbLayout, ie as bubbleLegendValues, h as bubbleRadiusScale, N as bulletDomain, vt as bulletRow, n as chordLayout, Xe as chordRibbon, Mt as clipPolylineToX, Vt as clipRingToX, pt as clusterRows, st as contourBands, Ke as contourLines, Ue as dataExtent, ke as dataRuns, ue as datumKeys, ze as decimalsOf, zt as decimateRun, wt as distanceMatrix, ft as dodgeSpan, tt as ecdfSteps, $e as errorBarPoints, U as eventPlotRows, Pt as facetGrid, re as facetSlots, It as fillBetweenCurve, ae as fillBetweenRings, V as fitRange, k as flattenPathSpec, De as gaugeAngle, Lt as gaugeBandIndex, ee as gaugeBands, c as gaugeFraction, H as gaussianKde, xt as gridNcols, Ee as hexbin, le as hierarchyJoin, C as hierarchyKeys, At as hierarchyTreeLayout, Ye as histogram2d, bt as histogramBins, Dt as imshowCells, ht as insideLabelFit, ne as isNonDecreasingX, _e as isPathTransition, Et as jitterOffsets, q as joinStages, v as keyWindow, D as keyedJoin, ce as keyframeAt, Z as largestRemainder, Me as leafOrder, et as legendLayout, it as linkageTree, ge as loess, be as loessBand, X as meanInterval, ot as mixBarLabelValues, I as morphArea, $ as morphAreaRuns, Gt as morphPolyline, s as morphRuns, de as morphSteps, a as mosaicLayout, Ct as normalizeValues, w as observable10, se as okabeIto, pe as ordinalColorScale, m as outerEdge, oe as packLayout, d as panelProgress, Ve as parallelAxisX, xe as parallelLines, fe as partitionLayout, ut as pcolormeshCells, nt as pieGrow, Ot as pieSlices, Ne as pieSweep, Ae as polarAreaSlices, Yt as quiverVectors, me as raceTimeline, qe as radarAxisFrames, we as radarFramePolygon, dt as radarLabelOffset, St as radarVertices, Fe as radialTreeLink, Be as radialTreePoint, je as reduceValues, t as regression, F as rescaleKind, Q as rescaleWindow, L as resolvePolarSweep, Oe as revealClipAlongX, Rt as revealCutoff, te as revealPolylinesAlongX, l as revealRingsAlongX, Re as ringLayout, mt as ringOrder, rt as rollingValues, he as samePath, u as sameRuns, E as sankeyLayout, P as sankeyRibbon, ct as scatterPoints, Kt as scatterPoints3, r as sizeLegendLayout, A as stackColumns, ve as stackOrder, Ge as stackTotals, Nt as stackedBands, Wt as stageProgress, o as staggeredStageProgress, g as stairsPolyline, Tt as stemPoints, qt as stemPoints3, Ie as studentT, Jt as surfaceGridFaces, Xt as surfaceGridWireframe, at as sweepShare, We as sweepWedge, W as symbolPolygon, x as tableau10, S as trailPolyline, gt as treeLink, b as treemapLayout, j as treemapRows, ye as triangulate, Y as tricontourBands, e as tricontourLines, Le as tripcolorFaces, _ as trisurfaceFaces, M as uniqueKeys, J as violinProfile, y as violinProfileRing, O as violinRing, Qt as voxelFaces, Ut as waffleCells, T as waterfallSteps, Ft as xExtent };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Seeded jitter: offsets that are a pure function of a key and a seed, so they stay put across frames and when scrubbed. */
|
|
2
|
+
/** @category Math */
|
|
3
|
+
export interface JitterOptions {
|
|
4
|
+
/** Total width the offsets spread over, centred on 0. @default 1 */
|
|
5
|
+
width?: number;
|
|
6
|
+
/** Varies the pattern. @default 0 */
|
|
7
|
+
seed?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* One offset in `[-width / 2, width / 2)` per key. Key by something stable
|
|
11
|
+
* (an id) and a datum keeps its offset as others come and go.
|
|
12
|
+
*
|
|
13
|
+
* @returns Offsets parallel to `keys`.
|
|
14
|
+
* @category Math & helpers
|
|
15
|
+
*/
|
|
16
|
+
export declare function jitterOffsets(keys: readonly (string | number)[], options?: JitterOptions): number[];
|
|
17
|
+
//# sourceMappingURL=jitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jitter.d.ts","sourceRoot":"","sources":["../../src/math/jitter.ts"],"names":[],"mappings":"AAAA,6HAA6H;AAI7H,qBAAqB;AACrB,MAAM,WAAW,aAAa;IAC7B,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,IAAI,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAClC,OAAO,GAAE,aAAkB,GACzB,MAAM,EAAE,CAIV"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyed data transitions: which marks enter, update and exit between two
|
|
3
|
+
* datasets, and how one blend `t` splits into stages. Pure, so a transition
|
|
4
|
+
* is a function of `t` and scrubs backwards exactly as it plays.
|
|
5
|
+
*/
|
|
6
|
+
import type { BandKey, Range } from "@sophistry/core/geometry";
|
|
7
|
+
/**
|
|
8
|
+
* Which keys of a keyed join are in which dataset.
|
|
9
|
+
*
|
|
10
|
+
* @category Math & helpers
|
|
11
|
+
*/
|
|
12
|
+
export interface KeyedJoin {
|
|
13
|
+
/** Every key once: `from`'s in order, then the keys only `to` has, in `to`'s order. */
|
|
14
|
+
readonly keys: readonly BandKey[];
|
|
15
|
+
/** Each key's index in the `from` keys. Missing: the key enters. */
|
|
16
|
+
readonly from: ReadonlyMap<BandKey, number>;
|
|
17
|
+
/** Each key's index in the `to` keys. Missing: the key exits. */
|
|
18
|
+
readonly to: ReadonlyMap<BandKey, number>;
|
|
19
|
+
/** True when some key is only in `to`. */
|
|
20
|
+
readonly enters: boolean;
|
|
21
|
+
/** True when some key is only in `from`. */
|
|
22
|
+
readonly exits: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Matches two key lists: keys in both update, keys only in `to` enter,
|
|
26
|
+
* keys only in `from` exit. Keys are compared with `===`.
|
|
27
|
+
*
|
|
28
|
+
* @param from - The keys at `t = 0`, one per datum.
|
|
29
|
+
* @param to - The keys at `t = 1`, one per datum.
|
|
30
|
+
* @category Math & helpers
|
|
31
|
+
*/
|
|
32
|
+
export declare function keyedJoin(from: readonly BandKey[], to: readonly BandKey[]): KeyedJoin;
|
|
33
|
+
/**
|
|
34
|
+
* How a keyed transition spends its blend: `"staged"` runs exit, then
|
|
35
|
+
* update, then enter (domains grow before the update and shrink after),
|
|
36
|
+
* each stage eased; `"together"` runs everything at once, linearly, so the
|
|
37
|
+
* driving track's easing applies.
|
|
38
|
+
*
|
|
39
|
+
* @see https://sophistry.dev/guides/chart-animation/#data-transitions
|
|
40
|
+
* @category Math & helpers
|
|
41
|
+
*/
|
|
42
|
+
export type JoinStaging = "staged" | "together";
|
|
43
|
+
/**
|
|
44
|
+
* A stage's share of the blend, `[start, end]` within 0..1.
|
|
45
|
+
*
|
|
46
|
+
* @category Math & helpers
|
|
47
|
+
*/
|
|
48
|
+
export type StageWindow = readonly [start: number, end: number];
|
|
49
|
+
/**
|
|
50
|
+
* Where each stage of a keyed transition falls within its blend. See
|
|
51
|
+
* {@link joinStages}.
|
|
52
|
+
*
|
|
53
|
+
* @category Math & helpers
|
|
54
|
+
*/
|
|
55
|
+
export interface JoinStages {
|
|
56
|
+
/** Exiting marks shrink or fade at their old place. */
|
|
57
|
+
readonly exit: StageWindow;
|
|
58
|
+
/** Domains that grow rescale here, before the update. */
|
|
59
|
+
readonly expand: StageWindow;
|
|
60
|
+
/** Matched marks move from old to new values; domains that shift without growing or shrinking rescale here too. */
|
|
61
|
+
readonly update: StageWindow;
|
|
62
|
+
/** Domains that shrink rescale here, after the update. */
|
|
63
|
+
readonly contract: StageWindow;
|
|
64
|
+
/** Entering marks grow or fade in at their new place. */
|
|
65
|
+
readonly enter: StageWindow;
|
|
66
|
+
/** Whether each stage eases in and out on its own (`"staged"`). */
|
|
67
|
+
readonly eased: boolean;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Options for {@link joinStages}.
|
|
71
|
+
*
|
|
72
|
+
* @category Math & helpers
|
|
73
|
+
*/
|
|
74
|
+
export interface JoinStageOptions {
|
|
75
|
+
/** Some mark exits. */
|
|
76
|
+
exits?: boolean;
|
|
77
|
+
/** Some mark enters. */
|
|
78
|
+
enters?: boolean;
|
|
79
|
+
/** Some domain grows (the new range contains the old). */
|
|
80
|
+
expand?: boolean;
|
|
81
|
+
/** Some domain shrinks (the old range contains the new). */
|
|
82
|
+
contract?: boolean;
|
|
83
|
+
/** See {@link JoinStaging}. @default "staged" */
|
|
84
|
+
staging?: JoinStaging;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Splits a keyed transition's blend into up to three equal phases, each
|
|
88
|
+
* present only when it has work: exits and growing domains, then the update
|
|
89
|
+
* (always), then shrinking domains and enters.
|
|
90
|
+
*
|
|
91
|
+
* @category Math & helpers
|
|
92
|
+
*/
|
|
93
|
+
export declare function joinStages(options?: JoinStageOptions): JoinStages;
|
|
94
|
+
/**
|
|
95
|
+
* The window a key's entries fade on: the exit (or enter) stage, or the
|
|
96
|
+
* update when the transition has none, so an entry one end shows is still
|
|
97
|
+
* whole at its end.
|
|
98
|
+
*
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
export declare function keyWindow(own: StageWindow, update: StageWindow): StageWindow;
|
|
102
|
+
/**
|
|
103
|
+
* How far a stage has got at blend `t`, 0..1: 0 before its window, 1 after,
|
|
104
|
+
* eased within it when `eased`. An empty window is a step at its start.
|
|
105
|
+
*
|
|
106
|
+
* @param eased - Ease within the window. Defaults to false.
|
|
107
|
+
* @category Math & helpers
|
|
108
|
+
*/
|
|
109
|
+
export declare function stageProgress(t: number, window: StageWindow, eased?: boolean): number;
|
|
110
|
+
/**
|
|
111
|
+
* One item's progress through a staggered stage: item `rank` of `count`
|
|
112
|
+
* starts `spread · rank / (count − 1)` of the way in and takes `1 − spread`
|
|
113
|
+
* of the window, eased on its own sub-window when `eased`. The total spread
|
|
114
|
+
* is fixed, so 5 or 500 items take the same time, and every item is exact at
|
|
115
|
+
* the window's ends.
|
|
116
|
+
*
|
|
117
|
+
* @param spread - 0 (all together, as {@link stageProgress}) to 0.95.
|
|
118
|
+
* @category Math & helpers
|
|
119
|
+
*/
|
|
120
|
+
export declare function staggeredStageProgress(t: number, window: StageWindow, eased: boolean, rank: number, count: number, spread: number): number;
|
|
121
|
+
/**
|
|
122
|
+
* How a domain changes between two ranges: `"expand"` when the new contains
|
|
123
|
+
* the old, `"contract"` when the old contains the new, `"none"` when equal,
|
|
124
|
+
* `"shift"` otherwise.
|
|
125
|
+
*
|
|
126
|
+
* @category Math & helpers
|
|
127
|
+
*/
|
|
128
|
+
export declare function rescaleKind(from: Readonly<Range>, to: Readonly<Range>): "none" | "expand" | "contract" | "shift";
|
|
129
|
+
/**
|
|
130
|
+
* The window a domain change rescales in: growing before the update,
|
|
131
|
+
* shrinking after it, a shift with it.
|
|
132
|
+
*
|
|
133
|
+
* @category Math & helpers
|
|
134
|
+
*/
|
|
135
|
+
export declare function rescaleWindow(stages: JoinStages, kind: "none" | "expand" | "contract" | "shift"): StageWindow;
|
|
136
|
+
//# sourceMappingURL=join.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"join.d.ts","sourceRoot":"","sources":["../../src/math/join.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACzB,uFAAuF;IACvF,QAAQ,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;IAClC,oEAAoE;IACpE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5C,iEAAiE;IACjE,QAAQ,CAAC,EAAE,EAAE,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1C,0CAA0C;IAC1C,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,4CAA4C;IAC5C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACxB,IAAI,EAAE,SAAS,OAAO,EAAE,EACxB,EAAE,EAAE,SAAS,OAAO,EAAE,GACpB,SAAS,CAwBX;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEhD;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IAC1B,uDAAuD;IACvD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,mHAAmH;IACnH,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,0DAA0D;IAC1D,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,yDAAyD;IACzD,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,mEAAmE;IACnE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAChC,uBAAuB;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wBAAwB;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,OAAO,CAAC,EAAE,WAAW,CAAC;CACtB;AASD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,gBAAqB,GAAG,UAAU,CA4BrE;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,CAE5E;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,WAAW,EACnB,KAAK,UAAQ,GACX,MAAM,CAMR;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACrC,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACZ,MAAM,CAQR;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAC1B,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,EACrB,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,GACjB,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAS1C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC5B,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAC5C,WAAW,CAMb"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time as an encoding: where a keyed series of keyframes stands between
|
|
3
|
+
* them, the trail it leaves behind, and the ranks of a bar chart race. Every
|
|
4
|
+
* function reads only the moment it is asked about, so playback scrubs.
|
|
5
|
+
*/
|
|
6
|
+
import type { BandKey, Point } from "@sophistry/core/geometry";
|
|
7
|
+
/**
|
|
8
|
+
* Where a moment falls among keyframe times.
|
|
9
|
+
*
|
|
10
|
+
* @category Math & helpers
|
|
11
|
+
*/
|
|
12
|
+
export interface KeyframeSpan {
|
|
13
|
+
/** Index of the keyframe at or before the moment. */
|
|
14
|
+
lo: number;
|
|
15
|
+
/** Index of the keyframe after it (`lo` itself on a keyframe). */
|
|
16
|
+
hi: number;
|
|
17
|
+
/** How far from `lo` to `hi`, 0..1. */
|
|
18
|
+
u: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The keyframes either side of `at` and the linear blend between them.
|
|
22
|
+
*
|
|
23
|
+
* @param times - Keyframe times, ascending.
|
|
24
|
+
* @returns The span, or undefined when `at` is outside the keyframes.
|
|
25
|
+
* @category Math & helpers
|
|
26
|
+
*/
|
|
27
|
+
export declare function keyframeAt(times: readonly number[], at: number): KeyframeSpan | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The path a keyed mark has travelled from `at - length` to `at`, both ends
|
|
30
|
+
* interpolated, in time order.
|
|
31
|
+
*
|
|
32
|
+
* @param times - Keyframe times, ascending, parallel to `points`.
|
|
33
|
+
* @param length - How much time the trail spans. Defaults to all of it.
|
|
34
|
+
* @returns The trail, or `[]` before the first keyframe.
|
|
35
|
+
* @category Math & helpers
|
|
36
|
+
*/
|
|
37
|
+
export declare function trailPolyline(points: readonly Point[], times: readonly number[], at: number, length?: number): Point[];
|
|
38
|
+
/**
|
|
39
|
+
* One entry of a bar chart race at a moment. See {@link raceTimeline}.
|
|
40
|
+
*
|
|
41
|
+
* @category Math & helpers
|
|
42
|
+
*/
|
|
43
|
+
export interface RaceEntry {
|
|
44
|
+
/** The entry's key. */
|
|
45
|
+
key: BandKey;
|
|
46
|
+
/** Its value, interpolated linearly between keyframes. */
|
|
47
|
+
value: number;
|
|
48
|
+
/** Its rank by that value, 0 for the first place. */
|
|
49
|
+
rank: number;
|
|
50
|
+
/** Where it is drawn, in ranks: `rank` at rest, sliding on the swap's ease after a change. */
|
|
51
|
+
position: number;
|
|
52
|
+
/**
|
|
53
|
+
* How present it is, 0..1: 1 within the `top` slots, fading to 0 as it
|
|
54
|
+
* slides past the last one. Always 1 without a `top`.
|
|
55
|
+
*/
|
|
56
|
+
presence: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A race at one moment, laid out for a band axis of `top` slots. See
|
|
60
|
+
* {@link RaceTimeline.view}.
|
|
61
|
+
*
|
|
62
|
+
* @category Math & helpers
|
|
63
|
+
*/
|
|
64
|
+
export interface RaceView {
|
|
65
|
+
/** The entries still present (`presence > 0`), in key order. */
|
|
66
|
+
entries: RaceEntry[];
|
|
67
|
+
/**
|
|
68
|
+
* The axis's categories: the `top` entries drawn nearest first place (all
|
|
69
|
+
* without a `top`), in key order. An entry sliding past the last slot is
|
|
70
|
+
* drawn past the axis's end (cut by `<Chart clip>`).
|
|
71
|
+
*/
|
|
72
|
+
categories: BandKey[];
|
|
73
|
+
/** Each entry's slot: its `position`, for a band axis's `slot` option. */
|
|
74
|
+
slot: (key: BandKey) => number | undefined;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Options for {@link raceTimeline}.
|
|
78
|
+
*
|
|
79
|
+
* @category Math & helpers
|
|
80
|
+
*/
|
|
81
|
+
export interface RaceOptions {
|
|
82
|
+
/**
|
|
83
|
+
* How long a rank swap takes, in the keyframes' time units; 0 swaps at once. Defaults to a
|
|
84
|
+
* quarter of the shortest gap between keyframes.
|
|
85
|
+
*/
|
|
86
|
+
swap?: number;
|
|
87
|
+
/** `"descending"` puts the largest value first. @default "descending" */
|
|
88
|
+
order?: "descending" | "ascending";
|
|
89
|
+
/**
|
|
90
|
+
* How many places are shown: entries ranked past it fade as they slide
|
|
91
|
+
* below the last place. Defaults to every entry.
|
|
92
|
+
*/
|
|
93
|
+
top?: number;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* A bar chart race, precomputed: ask it for any moment.
|
|
97
|
+
*
|
|
98
|
+
* @category Math & helpers
|
|
99
|
+
*/
|
|
100
|
+
export interface RaceTimeline {
|
|
101
|
+
/** The keys, in the order given. */
|
|
102
|
+
readonly keys: readonly BandKey[];
|
|
103
|
+
/** The keyframe times, ascending. */
|
|
104
|
+
readonly times: readonly number[];
|
|
105
|
+
/** How many places are shown (`top`), or undefined for all. */
|
|
106
|
+
readonly top: number | undefined;
|
|
107
|
+
/** Every entry at `time`, in key order. */
|
|
108
|
+
at(time: number): RaceEntry[];
|
|
109
|
+
/**
|
|
110
|
+
* The race at `time` laid out for a band axis. Pass `categories` and `slot`
|
|
111
|
+
* to `<Chart yAxis>` (with `clip`) and draw `entries`.
|
|
112
|
+
*/
|
|
113
|
+
view(time: number): RaceView;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* A bar chart race over keyframes: values interpolate linearly, ranks come
|
|
117
|
+
* from the interpolated values (so bars swap exactly when values cross), and
|
|
118
|
+
* each swap slides on its own short ease (`swap`). A pure function of time,
|
|
119
|
+
* so it scrubs.
|
|
120
|
+
*
|
|
121
|
+
* @param keys - One key per entry.
|
|
122
|
+
* @param times - Keyframe times, ascending.
|
|
123
|
+
* @param values - `values[k][e]`: entry `e`'s value at keyframe `k`; non-finite counts as 0.
|
|
124
|
+
* @see https://sophistry.dev/guides/chart-animation/#data-transitions
|
|
125
|
+
* @category Math & helpers
|
|
126
|
+
*/
|
|
127
|
+
export declare function raceTimeline(keys: readonly BandKey[], times: readonly number[], values: readonly (readonly number[])[], options?: RaceOptions): RaceTimeline;
|
|
128
|
+
//# sourceMappingURL=keyframes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyframes.d.ts","sourceRoot":"","sources":["../../src/math/keyframes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B,qDAAqD;IACrD,EAAE,EAAE,MAAM,CAAC;IACX,kEAAkE;IAClE,EAAE,EAAE,MAAM,CAAC;IACX,uCAAuC;IACvC,CAAC,EAAE,MAAM,CAAC;CACV;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACzB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,EAAE,EAAE,MAAM,GACR,YAAY,GAAG,SAAS,CAa1B;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC5B,MAAM,EAAE,SAAS,KAAK,EAAE,EACxB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,EAAE,EAAE,MAAM,EACV,MAAM,SAA2B,GAC/B,KAAK,EAAE,CAkBT;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACzB,uBAAuB;IACvB,GAAG,EAAE,OAAO,CAAC;IACb,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,8FAA8F;IAC9F,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACxB,gEAAgE;IAChE,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB;;;;OAIG;IACH,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB,0EAA0E;IAC1E,IAAI,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC3B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,KAAK,CAAC,EAAE,YAAY,GAAG,WAAW,CAAC;IACnC;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B,oCAAoC;IACpC,QAAQ,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;IAClC,qCAAqC;IACrC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,+DAA+D;IAC/D,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,2CAA2C;IAC3C,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,CAAC;IAC9B;;;OAGG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC7B;AAcD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAC3B,IAAI,EAAE,SAAS,OAAO,EAAE,EACxB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,MAAM,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EACtC,OAAO,GAAE,WAAgB,GACvB,YAAY,CAgId"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legend layout: where each entry's swatch and label go, given the labels'
|
|
3
|
+
* measured widths. Pure; the `<Legend>` component measures and draws.
|
|
4
|
+
*/
|
|
5
|
+
import type { Point } from "@sophistry/core/geometry";
|
|
6
|
+
/**
|
|
7
|
+
* Options for {@link legendLayout}. Lengths are in scene units.
|
|
8
|
+
*
|
|
9
|
+
* @category Math & helpers
|
|
10
|
+
*/
|
|
11
|
+
export interface LegendLayoutOptions {
|
|
12
|
+
/** `"column"`: one entry per row, top-down. `"row"`: entries side by side, wrapping at `maxWidth`. */
|
|
13
|
+
direction: "column" | "row";
|
|
14
|
+
/** Height of one row (an entry's line). */
|
|
15
|
+
rowHeight: number;
|
|
16
|
+
/** Width reserved for a swatch. */
|
|
17
|
+
swatchWidth: number;
|
|
18
|
+
/** Space between a swatch and its label. */
|
|
19
|
+
swatchGap: number;
|
|
20
|
+
/** Row direction: space between one entry's label and the next entry's swatch. */
|
|
21
|
+
itemGap: number;
|
|
22
|
+
/**
|
|
23
|
+
* Row direction: wrap before an entry that would run past this width. Defaults to no wrapping.
|
|
24
|
+
*/
|
|
25
|
+
maxWidth?: number;
|
|
26
|
+
/** Width of a title line above the entries, if there is one. */
|
|
27
|
+
titleWidth?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* One entry, placed. Offsets from the legend's top-left corner, y up (so
|
|
31
|
+
* rows below the first have negative y).
|
|
32
|
+
*
|
|
33
|
+
* @category Math & helpers
|
|
34
|
+
*/
|
|
35
|
+
export interface LegendItemLayout {
|
|
36
|
+
/** Centre of the swatch. */
|
|
37
|
+
swatch: Point;
|
|
38
|
+
/** Left end of the label, at the row's vertical middle. */
|
|
39
|
+
label: Point;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A legend, laid out.
|
|
43
|
+
*
|
|
44
|
+
* @category Math & helpers
|
|
45
|
+
*/
|
|
46
|
+
export interface LegendLayout {
|
|
47
|
+
items: LegendItemLayout[];
|
|
48
|
+
/** Left end of the title line, at its vertical middle; undefined without a title. */
|
|
49
|
+
title?: Point;
|
|
50
|
+
/** Overall width. */
|
|
51
|
+
width: number;
|
|
52
|
+
/** Overall height. */
|
|
53
|
+
height: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Lays a legend out from its labels' widths: swatches in a column (or a
|
|
57
|
+
* wrapping row), each label right of its swatch, an optional title on top.
|
|
58
|
+
*
|
|
59
|
+
* @param widths - Each label's width, in order.
|
|
60
|
+
* @category Math & helpers
|
|
61
|
+
*/
|
|
62
|
+
export declare function legendLayout(widths: readonly number[], options: LegendLayoutOptions): LegendLayout;
|
|
63
|
+
/**
|
|
64
|
+
* Options for {@link sizeLegendLayout}. Lengths are in scene units.
|
|
65
|
+
*
|
|
66
|
+
* @category Math & helpers
|
|
67
|
+
*/
|
|
68
|
+
export interface SizeLegendLayoutOptions {
|
|
69
|
+
/** `"column"`: one circle per row, top-down. `"row"`: side by side, wrapping at `maxWidth`. */
|
|
70
|
+
direction: "column" | "row";
|
|
71
|
+
/** The least height of a row: one line of text. A circle taller than that makes its row taller. */
|
|
72
|
+
rowHeight: number;
|
|
73
|
+
/** Space between a circle and its label. */
|
|
74
|
+
gap: number;
|
|
75
|
+
/** Row direction: space between one entry's label and the next entry's circle. */
|
|
76
|
+
itemGap: number;
|
|
77
|
+
/** Room kept above and below each circle. @default 0 */
|
|
78
|
+
pad?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Row direction: wrap before an entry that would run past this width. Defaults to no wrapping.
|
|
81
|
+
*/
|
|
82
|
+
maxWidth?: number;
|
|
83
|
+
/** Width of a title line above the entries, if there is one. */
|
|
84
|
+
titleWidth?: number;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* One size-key entry, placed. Offsets from the key's top-left corner, y up.
|
|
88
|
+
*
|
|
89
|
+
* @category Math & helpers
|
|
90
|
+
*/
|
|
91
|
+
export interface SizeLegendItemLayout {
|
|
92
|
+
/** Centre of the circle. */
|
|
93
|
+
center: Point;
|
|
94
|
+
/** Left end of the label, level with the circle's centre. */
|
|
95
|
+
label: Point;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* A size key, laid out.
|
|
99
|
+
*
|
|
100
|
+
* @category Math & helpers
|
|
101
|
+
*/
|
|
102
|
+
export interface SizeLegendLayout {
|
|
103
|
+
items: SizeLegendItemLayout[];
|
|
104
|
+
/** Left end of the title line, at its vertical middle; undefined without a title. */
|
|
105
|
+
title?: Point;
|
|
106
|
+
/** Overall width. */
|
|
107
|
+
width: number;
|
|
108
|
+
/** Overall height. */
|
|
109
|
+
height: number;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Lays a size key out: one reference circle per entry with its value
|
|
113
|
+
* beside it. In a column the circles share one centre line and each row is
|
|
114
|
+
* as tall as its circle; in a row every row is as tall as its tallest entry.
|
|
115
|
+
*
|
|
116
|
+
* @param radii - Each entry's circle radius, in order.
|
|
117
|
+
* @param widths - Each entry's label width, in order.
|
|
118
|
+
* @category Math & helpers
|
|
119
|
+
*/
|
|
120
|
+
export declare function sizeLegendLayout(radii: readonly number[], widths: readonly number[], options: SizeLegendLayoutOptions): SizeLegendLayout;
|
|
121
|
+
//# sourceMappingURL=legend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["../../src/math/legend.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IACnC,sGAAsG;IACtG,SAAS,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC5B,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAChC,4BAA4B;IAC5B,MAAM,EAAE,KAAK,CAAC;IACd,2DAA2D;IAC3D,KAAK,EAAE,KAAK,CAAC;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,qFAAqF;IACrF,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC3B,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,EAAE,mBAAmB,GAC1B,YAAY,CA8Cd;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACvC,+FAA+F;IAC/F,SAAS,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC5B,mGAAmG;IACnG,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,kFAAkF;IAClF,OAAO,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACpC,4BAA4B;IAC5B,MAAM,EAAE,KAAK,CAAC;IACd,6DAA6D;IAC7D,KAAK,EAAE,KAAK,CAAC;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAC9B,qFAAqF;IACrF,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,EAAE,uBAAuB,GAC9B,gBAAgB,CAyDlB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** Line plots from discrete data, split into continuous runs at non-finite pairs (a gap, not a spike). */
|
|
2
|
+
import type { Point } from "@sophistry/core/geometry";
|
|
3
|
+
/**
|
|
4
|
+
* Parallel `x`/`y` arrays split into runs, breaking at non-finite pairs.
|
|
5
|
+
*
|
|
6
|
+
* @returns Runs of consecutive finite points; single-point runs are dropped.
|
|
7
|
+
* @category Math & helpers
|
|
8
|
+
*/
|
|
9
|
+
export declare function dataRuns(xs: readonly number[], ys: readonly number[]): Point[][];
|
|
10
|
+
/**
|
|
11
|
+
* Whether a run's x never decreases: the precondition for
|
|
12
|
+
* {@link decimateRun}, which bisects on x.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare function isNonDecreasingX(run: readonly Point[]): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* How many points per column a run must exceed, inside the window, before
|
|
19
|
+
* {@link decimateRun} thins it: below this the line is drawn as given.
|
|
20
|
+
*/
|
|
21
|
+
export declare const DECIMATION_MIN_PER_COLUMN = 4;
|
|
22
|
+
/**
|
|
23
|
+
* Min/max-per-column ("M4") decimation of a long line: inside `edges`' window,
|
|
24
|
+
* each column keeps only its first, last, lowest and highest points, in
|
|
25
|
+
* order. A line through them covers, column by column, exactly the span the
|
|
26
|
+
* full line does and enters and leaves each column at the same points, so
|
|
27
|
+
* with a column per device pixel it rasterises to the same pixels (Jugel et
|
|
28
|
+
* al., "M4", VLDB 2014) at no more than four points per column, however many
|
|
29
|
+
* the data holds.
|
|
30
|
+
*
|
|
31
|
+
* Outside the window the run is kept as it is — or, with `dropOutside` (the
|
|
32
|
+
* window is clipped, so nothing past it shows), cut to the one point each
|
|
33
|
+
* side that carries the line to the window's edge.
|
|
34
|
+
*
|
|
35
|
+
* @param run - Points with non-decreasing x (see {@link isNonDecreasingX}).
|
|
36
|
+
* @param edges - Column boundaries in data x, ascending; column `k` is
|
|
37
|
+
* `[edges[k], edges[k + 1])`, the last one closed.
|
|
38
|
+
* @param dropOutside - Whether points beyond the window can be dropped.
|
|
39
|
+
* @returns The kept points (the run's own objects), or `run` itself when the
|
|
40
|
+
* window holds no more than {@link DECIMATION_MIN_PER_COLUMN} points per
|
|
41
|
+
* column.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
export declare function decimateRun(run: readonly Point[], edges: readonly number[], dropOutside?: boolean): readonly Point[];
|
|
45
|
+
/**
|
|
46
|
+
* Whether two lines' runs hold the same points: lengths, then coordinates,
|
|
47
|
+
* stopping at the first difference. The equality for point arrays that can
|
|
48
|
+
* be long, where `deepEqual`'s `Object.keys` per array would allocate a key
|
|
49
|
+
* per point on every comparison, even one that fails at once.
|
|
50
|
+
*
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
export declare function sameRuns(a: readonly (readonly Point[])[], b: readonly (readonly Point[])[]): boolean;
|
|
54
|
+
//# sourceMappingURL=line.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../src/math/line.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAE1G,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAGtD;;;;;GAKG;AACH,wBAAgB,QAAQ,CACvB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,GACnB,KAAK,EAAE,EAAE,CAgBX;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,SAAS,KAAK,EAAE,GAAG,OAAO,CAI/D;AAcD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,WAAW,CAC1B,GAAG,EAAE,SAAS,KAAK,EAAE,EACrB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,WAAW,UAAQ,GACjB,SAAS,KAAK,EAAE,CAyClB;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACvB,CAAC,EAAE,SAAS,CAAC,SAAS,KAAK,EAAE,CAAC,EAAE,EAChC,CAAC,EAAE,SAAS,CAAC,SAAS,KAAK,EAAE,CAAC,EAAE,GAC9B,OAAO,CAaT"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data-space morphing: a line, an area or a step function at blend `t`
|
|
3
|
+
* between two versions of itself, interpolated in data units so every frame
|
|
4
|
+
* is a valid chart of its kind under whatever scale is current.
|
|
5
|
+
*/
|
|
6
|
+
import type { Point } from "@sophistry/core/geometry";
|
|
7
|
+
/**
|
|
8
|
+
* Morphs one polyline into another in data units. Two functions of x are
|
|
9
|
+
* resampled onto the union of their xs and blended per x, so points move
|
|
10
|
+
* vertically and the x extent grows or retreats at the ends; other shapes
|
|
11
|
+
* are resampled by arc length and blended point by point. `t = 0` returns
|
|
12
|
+
* `from`, `t = 1` returns `to`.
|
|
13
|
+
*
|
|
14
|
+
* @param t - Blend, clamped to 0..1.
|
|
15
|
+
* @category Math & helpers
|
|
16
|
+
*/
|
|
17
|
+
export declare function morphPolyline(from: readonly Point[], to: readonly Point[], t: number): Point[];
|
|
18
|
+
/**
|
|
19
|
+
* Morphs a line of several runs (split at data gaps) into another: run by
|
|
20
|
+
* run when the counts match, else as one line (gaps open or close only at
|
|
21
|
+
* the ends of the blend). See {@link morphPolyline}.
|
|
22
|
+
*
|
|
23
|
+
* @param t - Blend, clamped to 0..1.
|
|
24
|
+
* @category Math & helpers
|
|
25
|
+
*/
|
|
26
|
+
export declare function morphRuns(from: readonly (readonly Point[])[], to: readonly (readonly Point[])[], t: number): Point[][];
|
|
27
|
+
/**
|
|
28
|
+
* One x of an area: its two bounds there, `y1` and `y2` in either order.
|
|
29
|
+
*
|
|
30
|
+
* @category Math & helpers
|
|
31
|
+
*/
|
|
32
|
+
export interface AreaPoint {
|
|
33
|
+
x: number;
|
|
34
|
+
y1: number;
|
|
35
|
+
y2: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Morphs one area (a band, a stacked layer, a density fill) into another in
|
|
39
|
+
* data units, both bounds together. Two functions of x are resampled onto
|
|
40
|
+
* the union of their xs and blended per x, as {@link morphPolyline}, so
|
|
41
|
+
* adjacent stack layers keep sharing an edge; other shapes are blended
|
|
42
|
+
* point by point. `t = 0` returns `from`, `t = 1` returns `to`.
|
|
43
|
+
*
|
|
44
|
+
* @param t - Blend, clamped to 0..1.
|
|
45
|
+
* @category Math & helpers
|
|
46
|
+
*/
|
|
47
|
+
export declare function morphArea(from: readonly AreaPoint[], to: readonly AreaPoint[], t: number): AreaPoint[];
|
|
48
|
+
/**
|
|
49
|
+
* Morphs an area of several runs (split at data gaps) into another: run by
|
|
50
|
+
* run when the counts match, else as one area. See {@link morphArea}.
|
|
51
|
+
*
|
|
52
|
+
* @param t - Blend, clamped to 0..1.
|
|
53
|
+
* @category Math & helpers
|
|
54
|
+
*/
|
|
55
|
+
export declare function morphAreaRuns(from: readonly (readonly AreaPoint[])[], to: readonly (readonly AreaPoint[])[], t: number): AreaPoint[][];
|
|
56
|
+
/**
|
|
57
|
+
* A step function: `values[i]` held across `[edges[i], edges[i + 1]]`, so
|
|
58
|
+
* one more edge than values.
|
|
59
|
+
*
|
|
60
|
+
* @category Math & helpers
|
|
61
|
+
*/
|
|
62
|
+
export interface StepFunction {
|
|
63
|
+
/** Step boundaries, ascending, in data units. */
|
|
64
|
+
edges: readonly number[];
|
|
65
|
+
/** One height per interval, in data units. */
|
|
66
|
+
values: readonly number[];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Morphs one step function into another in data units, so every frame is
|
|
70
|
+
* still stairs. Both are resampled onto the union of their edges and each
|
|
71
|
+
* height blended; outer edges blend between the extents. Non-ascending
|
|
72
|
+
* edges cut from `from` to `to` at `t = 0.5`.
|
|
73
|
+
*
|
|
74
|
+
* @param t - Blend, clamped to 0..1.
|
|
75
|
+
* @returns The step function at `t`, with `edges.length === values.length + 1`.
|
|
76
|
+
* @category Math & helpers
|
|
77
|
+
*/
|
|
78
|
+
export declare function morphSteps(from: StepFunction, to: StepFunction, t: number): {
|
|
79
|
+
edges: number[];
|
|
80
|
+
values: number[];
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=morph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph.d.ts","sourceRoot":"","sources":["../../src/math/morph.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AA2DtD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC5B,IAAI,EAAE,SAAS,KAAK,EAAE,EACtB,EAAE,EAAE,SAAS,KAAK,EAAE,EACpB,CAAC,EAAE,MAAM,GACP,KAAK,EAAE,CA4CT;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACxB,IAAI,EAAE,SAAS,CAAC,SAAS,KAAK,EAAE,CAAC,EAAE,EACnC,EAAE,EAAE,SAAS,CAAC,SAAS,KAAK,EAAE,CAAC,EAAE,EACjC,CAAC,EAAE,MAAM,GACP,KAAK,EAAE,EAAE,CAQX;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACX;AA4CD;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CACxB,IAAI,EAAE,SAAS,SAAS,EAAE,EAC1B,EAAE,EAAE,SAAS,SAAS,EAAE,EACxB,CAAC,EAAE,MAAM,GACP,SAAS,EAAE,CAmCb;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,IAAI,EAAE,SAAS,CAAC,SAAS,SAAS,EAAE,CAAC,EAAE,EACvC,EAAE,EAAE,SAAS,CAAC,SAAS,SAAS,EAAE,CAAC,EAAE,EACrC,CAAC,EAAE,MAAM,GACP,SAAS,EAAE,EAAE,CAQf;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC5B,iDAAiD;IACjD,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,8CAA8C;IAC9C,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B;AA0BD;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CACzB,IAAI,EAAE,YAAY,EAClB,EAAE,EAAE,YAAY,EAChB,CAAC,EAAE,MAAM,GACP;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CA4BvC"}
|