@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,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chord diagram layout over a square flow matrix: `matrix[i][j]` is the
|
|
3
|
+
* flow from group `i` to `j`. Each group is an arc as long as its outflow;
|
|
4
|
+
* a chord joins sub-arc `i → j` to `j → i`, each end as wide as its flow.
|
|
5
|
+
* Angles are radians from +x, y up, starting at 12 o'clock clockwise.
|
|
6
|
+
*/
|
|
7
|
+
import type { Point } from "@sophistry/core/geometry";
|
|
8
|
+
import type { PolarSweepOptions } from "./shared/polar";
|
|
9
|
+
/** @category Math */
|
|
10
|
+
export interface ChordOptions extends PolarSweepOptions {
|
|
11
|
+
/** Gap between neighbouring groups, in radians. @default 0.04 */
|
|
12
|
+
padAngle?: number;
|
|
13
|
+
/** Order each group's sub-arcs by descending flow instead of by column. @default false */
|
|
14
|
+
sortSubgroups?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Every non-zero `matrix[i][j]` becomes its own chord, equally wide at both
|
|
17
|
+
* ends, and a group's arc holds outflow then inflow (so receive-only groups
|
|
18
|
+
* get an arc). Off, one chord per pair with arcs sized by outflow.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
directed?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* One group's arc.
|
|
25
|
+
*
|
|
26
|
+
* @category Math & helpers
|
|
27
|
+
*/
|
|
28
|
+
export interface ChordGroup {
|
|
29
|
+
/** Row (and column) of the matrix. */
|
|
30
|
+
index: number;
|
|
31
|
+
/** Radians from +x, where the arc begins. */
|
|
32
|
+
startAngle: number;
|
|
33
|
+
/** Radians from +x, where it ends: `endAngle - startAngle` is the signed sweep. */
|
|
34
|
+
endAngle: number;
|
|
35
|
+
/** The row's total: everything leaving the group (plus, when `directed`, everything arriving). */
|
|
36
|
+
value: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* One end of a chord: a sub-arc of a group.
|
|
40
|
+
*
|
|
41
|
+
* @category Math & helpers
|
|
42
|
+
*/
|
|
43
|
+
export interface ChordEnd {
|
|
44
|
+
/** The group the end sits on. */
|
|
45
|
+
index: number;
|
|
46
|
+
/** The group at the chord's other end. */
|
|
47
|
+
subindex: number;
|
|
48
|
+
startAngle: number;
|
|
49
|
+
endAngle: number;
|
|
50
|
+
/** The flow this end stands for: `matrix[index][subindex]` (a directed chord's target end: `matrix[subindex][index]`). */
|
|
51
|
+
value: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A chord between two groups (or a group and itself).
|
|
55
|
+
*
|
|
56
|
+
* @category Math & helpers
|
|
57
|
+
*/
|
|
58
|
+
export interface ChordLink {
|
|
59
|
+
/** The end with the larger flow. */
|
|
60
|
+
source: ChordEnd;
|
|
61
|
+
/** The other end. */
|
|
62
|
+
target: ChordEnd;
|
|
63
|
+
}
|
|
64
|
+
/** @category Math */
|
|
65
|
+
export interface ChordLayout {
|
|
66
|
+
/** One arc per matrix row, in index order. */
|
|
67
|
+
groups: ChordGroup[];
|
|
68
|
+
/** One chord per pair of groups with any flow between them, by source row then column. */
|
|
69
|
+
chords: ChordLink[];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Lays a square flow matrix out as a chord diagram's groups and chords.
|
|
73
|
+
*
|
|
74
|
+
* @param matrix - `matrix[i][j]` is the flow from `i` to `j`; negative and non-finite entries count as 0, ragged rows are padded with 0.
|
|
75
|
+
* @returns The groups and chords; no chords and zero-length groups when there is no flow.
|
|
76
|
+
* @category Math & helpers
|
|
77
|
+
*/
|
|
78
|
+
export declare function chordLayout(matrix: readonly (readonly number[])[], options?: ChordOptions): ChordLayout;
|
|
79
|
+
/** @category Math */
|
|
80
|
+
export interface ChordRibbonOptions {
|
|
81
|
+
/** Centre. Defaults to the origin. */
|
|
82
|
+
center?: Point;
|
|
83
|
+
/** Points per radian along each end's arc. @default 24 */
|
|
84
|
+
arcDensity?: number;
|
|
85
|
+
/** Points along each curve through the middle. @default 24 */
|
|
86
|
+
curveSamples?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Draw the target end as an arrowhead: the ribbon stops this far short of
|
|
89
|
+
* the circle and narrows to a point on it. For directed chords; in
|
|
90
|
+
* `radius`'s units.
|
|
91
|
+
* @default 0
|
|
92
|
+
*/
|
|
93
|
+
headRadius?: number;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* A chord's ribbon as one open ring: along the source arc, a quadratic
|
|
97
|
+
* curve through the centre to the target, along its arc (or an arrowhead
|
|
98
|
+
* with `headRadius`), and back.
|
|
99
|
+
*
|
|
100
|
+
* @param radius - Radius the ends sit on.
|
|
101
|
+
* @category Math & helpers
|
|
102
|
+
*/
|
|
103
|
+
export declare function chordRibbon(chord: ChordLink, radius: number, options?: ChordRibbonOptions): Point[];
|
|
104
|
+
//# sourceMappingURL=chord.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chord.d.ts","sourceRoot":"","sources":["../../src/math/chord.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,qBAAqB;AACrB,MAAM,WAAW,YAAa,SAAQ,iBAAiB;IACtD,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0FAA0F;IAC1F,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IAC1B,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,QAAQ,EAAE,MAAM,CAAC;IACjB,kGAAkG;IAClG,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACxB,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,0HAA0H;IAC1H,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACzB,oCAAoC;IACpC,MAAM,EAAE,QAAQ,CAAC;IACjB,qBAAqB;IACrB,MAAM,EAAE,QAAQ,CAAC;CACjB;AAED,qBAAqB;AACrB,MAAM,WAAW,WAAW;IAC3B,8CAA8C;IAC9C,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,0FAA0F;IAC1F,MAAM,EAAE,SAAS,EAAE,CAAC;CACpB;AAOD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAC1B,MAAM,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EACtC,OAAO,GAAE,YAAiB,GACxB,WAAW,CA+Eb;AAED,qBAAqB;AACrB,MAAM,WAAW,kBAAkB;IAClC,sCAAsC;IACtC,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAC1B,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,kBAAuB,GAC9B,KAAK,EAAE,CAgDT"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agglomerative hierarchical clustering: pairwise row distances, the merge
|
|
3
|
+
* tree single, complete or average linkage builds, and the leaf order a
|
|
4
|
+
* dendrogram follows. The tree feeds {@link hierarchyTreeLayout} with
|
|
5
|
+
* `distance: (n) => n.height`.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* How cluster distance is measured from member distances: `"single"` (the
|
|
9
|
+
* closest pair; chained clusters), `"complete"` (the farthest pair; compact
|
|
10
|
+
* clusters) or `"average"` (the mean over all pairs, UPGMA).
|
|
11
|
+
*
|
|
12
|
+
* @category Math & helpers
|
|
13
|
+
*/
|
|
14
|
+
export type ClusterLinkage = "single" | "complete" | "average";
|
|
15
|
+
/**
|
|
16
|
+
* How far apart two rows are: `"euclidean"`, `"manhattan"` (sum of absolute
|
|
17
|
+
* differences) or `"correlation"` (`1 − r`: rows that rise and fall
|
|
18
|
+
* together are close whatever their level).
|
|
19
|
+
*
|
|
20
|
+
* @category Math & helpers
|
|
21
|
+
*/
|
|
22
|
+
export type ClusterMetric = "euclidean" | "manhattan" | "correlation";
|
|
23
|
+
/**
|
|
24
|
+
* One node of a merge tree: a leaf (one input row) or the merge of two
|
|
25
|
+
* clusters.
|
|
26
|
+
*
|
|
27
|
+
* @category Math & helpers
|
|
28
|
+
*/
|
|
29
|
+
export interface ClusterNode {
|
|
30
|
+
/** The input row of a leaf; -1 for a merge. */
|
|
31
|
+
index: number;
|
|
32
|
+
/** The linkage distance at which the two children merged; 0 for a leaf. */
|
|
33
|
+
height: number;
|
|
34
|
+
/** How many rows the cluster holds. */
|
|
35
|
+
size: number;
|
|
36
|
+
/** A merge's two clusters, the one holding the lower row index first; absent on a leaf. */
|
|
37
|
+
children?: [ClusterNode, ClusterNode];
|
|
38
|
+
}
|
|
39
|
+
/** @category Math */
|
|
40
|
+
export interface ClusterTree {
|
|
41
|
+
/** The merge tree, or `null` when there are no rows. */
|
|
42
|
+
root: ClusterNode | null;
|
|
43
|
+
/** The rows in dendrogram (left-to-right leaf) order: the order to draw them in. */
|
|
44
|
+
order: number[];
|
|
45
|
+
}
|
|
46
|
+
/** @category Math */
|
|
47
|
+
export interface ClusterOptions {
|
|
48
|
+
/** See {@link ClusterLinkage}. @default "average" */
|
|
49
|
+
linkage?: ClusterLinkage;
|
|
50
|
+
/** See {@link ClusterMetric}. @default "euclidean" */
|
|
51
|
+
metric?: ClusterMetric;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The distance between every pair of rows. Non-finite entries are skipped
|
|
55
|
+
* pairwise and the sum scaled up to all columns, so a gap neither shrinks
|
|
56
|
+
* nor grows a distance; rows with no column in common get `NaN`.
|
|
57
|
+
*
|
|
58
|
+
* @param metric - Defaults to `"euclidean"`.
|
|
59
|
+
* @returns A symmetric `n × n` matrix with zeros on the diagonal.
|
|
60
|
+
* @category Math & helpers
|
|
61
|
+
*/
|
|
62
|
+
export declare function distanceMatrix(rows: readonly (readonly number[])[], metric?: ClusterMetric): number[][];
|
|
63
|
+
/**
|
|
64
|
+
* Agglomerative clustering over a distance matrix: the two closest clusters
|
|
65
|
+
* merge until one is left. Ties merge the lowest row indices first, so it
|
|
66
|
+
* is deterministic; heights rise toward the root. A non-finite distance
|
|
67
|
+
* counts as the largest finite one. O(n³) in rows.
|
|
68
|
+
*
|
|
69
|
+
* @param linkage - Defaults to `"average"`.
|
|
70
|
+
* @returns The merge tree and the dendrogram's leaf order.
|
|
71
|
+
* @category Math & helpers
|
|
72
|
+
*/
|
|
73
|
+
export declare function linkageTree(distances: readonly (readonly number[])[], linkage?: ClusterLinkage): ClusterTree;
|
|
74
|
+
/**
|
|
75
|
+
* Clusters rows by their values: {@link distanceMatrix} then
|
|
76
|
+
* {@link linkageTree}.
|
|
77
|
+
*
|
|
78
|
+
* @param rows - One vector per row (non-finite entries are gaps).
|
|
79
|
+
* @returns The merge tree and the rows' dendrogram order.
|
|
80
|
+
* @category Math & helpers
|
|
81
|
+
*/
|
|
82
|
+
export declare function clusterRows(rows: readonly (readonly number[])[], options?: ClusterOptions): ClusterTree;
|
|
83
|
+
/**
|
|
84
|
+
* A merge tree's leaves, left to right: the input rows in dendrogram order.
|
|
85
|
+
*
|
|
86
|
+
* @category Math & helpers
|
|
87
|
+
*/
|
|
88
|
+
export declare function leafOrder(root: ClusterNode): number[];
|
|
89
|
+
//# sourceMappingURL=cluster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cluster.d.ts","sourceRoot":"","sources":["../../src/math/cluster.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,WAAW,GAAG,aAAa,CAAC;AAEtE;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC3B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;CACtC;AAED,qBAAqB;AACrB,MAAM,WAAW,WAAW;IAC3B,wDAAwD;IACxD,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IACzB,oFAAoF;IACpF,KAAK,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,qBAAqB;AACrB,MAAM,WAAW,cAAc;IAC9B,qDAAqD;IACrD,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,sDAAsD;IACtD,MAAM,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC7B,IAAI,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EACpC,MAAM,GAAE,aAA2B,GACjC,MAAM,EAAE,EAAE,CAYZ;AA4CD;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAC1B,SAAS,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EACzC,OAAO,GAAE,cAA0B,GACjC,WAAW,CAqEb;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAC1B,IAAI,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EACpC,OAAO,GAAE,cAAmB,GAC1B,WAAW,CAKb;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,EAAE,CASrD"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contour lines: iso-lines of a scalar field on a regular grid, by marching
|
|
3
|
+
* squares. `x` has length `ncols`, `y` length `nrows`, and `z[row][col]` is
|
|
4
|
+
* the sample at `(x[col], y[row])`.
|
|
5
|
+
*/
|
|
6
|
+
import type { Point } from "@sophistry/core/geometry";
|
|
7
|
+
type Pt = Point;
|
|
8
|
+
/** @category Math */
|
|
9
|
+
export interface ContourLine {
|
|
10
|
+
level: number;
|
|
11
|
+
points: Point[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* `count` evenly spaced levels strictly between `min` and `max`.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare function evenLevels(min: number, max: number, count: number): number[];
|
|
19
|
+
/**
|
|
20
|
+
* A contour segment: its two crossing points, and the identity of each — the
|
|
21
|
+
* grid or triangle edge it lies on, or the corner when the field is exactly at
|
|
22
|
+
* the level there — so the two cells sharing an edge meet at the same key.
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export interface KeyedSegment {
|
|
27
|
+
keys: [number, number];
|
|
28
|
+
points: [Pt, Pt];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Stitches keyed segments into connected polylines, each running in its
|
|
32
|
+
* lowest-index segment's direction; a loop repeats its first point at the end.
|
|
33
|
+
*
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
export declare function stitch(segments: readonly KeyedSegment[]): Point[][];
|
|
37
|
+
/**
|
|
38
|
+
* Iso-lines of `z` at `levels` by marching squares, one {@link ContourLine}
|
|
39
|
+
* per connected run. Cells touching a NaN corner are skipped; saddles are
|
|
40
|
+
* resolved by the cell's mean value.
|
|
41
|
+
*
|
|
42
|
+
* @param z - Samples as `z[row][col]`, at `(x[col], y[row])`.
|
|
43
|
+
* @param levels - Explicit levels, or a count strictly between the data's min and max.
|
|
44
|
+
* @returns Polylines tagged with their level; `[]` for a grid under 2 x 2 or `x`/`y` shorter than `z`.
|
|
45
|
+
* @category Math & helpers
|
|
46
|
+
*/
|
|
47
|
+
export declare function contourLines(x: readonly number[], y: readonly number[], z: readonly (readonly number[])[], levels: readonly number[] | number): ContourLine[];
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=contour.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contour.d.ts","sourceRoot":"","sources":["../../src/math/contour.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAItD,KAAK,EAAE,GAAG,KAAK,CAAC;AAEhB,qBAAqB;AACrB,MAAM,WAAW,WAAW;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,KAAK,EAAE,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAK5E;AAqBD;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvB,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;CACjB;AAOD;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,GAAG,KAAK,EAAE,EAAE,CAqBnE;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC3B,CAAC,EAAE,SAAS,MAAM,EAAE,EACpB,CAAC,EAAE,SAAS,MAAM,EAAE,EACpB,CAAC,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EACjC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAChC,WAAW,EAAE,CAkIf"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filled contours: bands between consecutive level thresholds over a grid
|
|
3
|
+
* (`x` length `ncols`, `y` length `nrows`, `z[row][col]` at `(x[col],
|
|
4
|
+
* y[row])`). Each grid cell is clipped on its own, giving many small
|
|
5
|
+
* polygons per band that meet edge to edge without gaps.
|
|
6
|
+
*/
|
|
7
|
+
import type { Point } from "@sophistry/core/geometry";
|
|
8
|
+
/**
|
|
9
|
+
* A clip vertex: a point plus the field value at it.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export interface Vtx {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
z: number;
|
|
17
|
+
}
|
|
18
|
+
/** @category Math */
|
|
19
|
+
export interface ContourBand {
|
|
20
|
+
loLevel: number;
|
|
21
|
+
hiLevel: number;
|
|
22
|
+
/** Closed polygon rings, in data space, one per contributing grid cell. */
|
|
23
|
+
polygons: Point[][];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* `count` evenly spaced band boundaries spanning `[min, max]` inclusively,
|
|
27
|
+
* so every sample falls in a band.
|
|
28
|
+
*
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare function evenBoundaries(min: number, max: number, count: number): number[];
|
|
32
|
+
/**
|
|
33
|
+
* Clips a convex polygon by a half-plane of `z` (`z >= threshold` with
|
|
34
|
+
* `keepAbove`, else `z <= threshold`); new vertices sit exactly on the
|
|
35
|
+
* threshold.
|
|
36
|
+
*
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export declare function clipByThreshold(poly: Vtx[], threshold: number, keepAbove: boolean): Vtx[];
|
|
40
|
+
/**
|
|
41
|
+
* Fills `z` into bands between consecutive `levels`: `N` levels make `N - 1`
|
|
42
|
+
* closed bands `loLevel <= z <= hiLevel`. Cells touching a NaN corner, and
|
|
43
|
+
* constant fields, contribute nothing.
|
|
44
|
+
*
|
|
45
|
+
* @param z - Samples as `z[row][col]`, at `(x[col], y[row])`.
|
|
46
|
+
* @param levels - Explicit boundaries, or a count spanning the data.
|
|
47
|
+
* @returns One {@link ContourBand} per pair of consecutive levels.
|
|
48
|
+
* @category Math & helpers
|
|
49
|
+
*/
|
|
50
|
+
export declare function contourBands(x: readonly number[], y: readonly number[], z: readonly (readonly number[])[], levels: readonly number[] | number): ContourBand[];
|
|
51
|
+
//# sourceMappingURL=contourf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contourf.d.ts","sourceRoot":"","sources":["../../src/math/contourf.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAGtD;;;;GAIG;AACH,MAAM,WAAW,GAAG;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AAED,qBAAqB;AACrB,MAAM,WAAW,WAAW;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC7B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GACX,MAAM,EAAE,CAMV;AAUD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC9B,IAAI,EAAE,GAAG,EAAE,EACX,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,OAAO,GAChB,GAAG,EAAE,CAsBP;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC3B,CAAC,EAAE,SAAS,MAAM,EAAE,EACpB,CAAC,EAAE,SAAS,MAAM,EAAE,EACpB,CAAC,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EACjC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAChC,WAAW,EAAE,CAmDf"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dodging overlapping marks apart: in data space, sub-bands within a
|
|
3
|
+
* category's band (`dodgeSpan`, grouped bars); in screen space, circles
|
|
4
|
+
* pushed off an axis until they clear each other (`beeswarmOffsets`).
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Sub-band `slot` of `count` within one band, as fractions `[from, to]` of
|
|
8
|
+
* the band, with `padding` of each sub-band left empty.
|
|
9
|
+
*
|
|
10
|
+
* @param padding - Fraction of each sub-band left empty, 0..1. Defaults to 0.1.
|
|
11
|
+
* @category Math & helpers
|
|
12
|
+
*/
|
|
13
|
+
export declare function dodgeSpan(slot: number, count: number, padding?: number): [number, number];
|
|
14
|
+
/** @category Math */
|
|
15
|
+
export interface BeeswarmOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Which side of the axis circles may move to: `"both"` (centred on the
|
|
18
|
+
* axis), `"positive"` or `"negative"` (standing on a baseline).
|
|
19
|
+
* @default "both"
|
|
20
|
+
*/
|
|
21
|
+
side?: "both" | "positive" | "negative";
|
|
22
|
+
/** Extra room left between neighbouring circles, in the same units as the radii. @default 0 */
|
|
23
|
+
gap?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Beeswarm offsets: each circle keeps its position along the axis and moves
|
|
27
|
+
* across it just far enough to clear those placed before it (in ascending
|
|
28
|
+
* order). Deterministic, so it scrubs. Positions and radii share units
|
|
29
|
+
* (scene units).
|
|
30
|
+
*
|
|
31
|
+
* @param positions - Each circle's centre along the axis; non-finite ones get `NaN`.
|
|
32
|
+
* @param radii - One radius for every circle, or one per circle.
|
|
33
|
+
* @returns One offset across the axis per circle.
|
|
34
|
+
* @category Math & helpers
|
|
35
|
+
*/
|
|
36
|
+
export declare function beeswarmOffsets(positions: readonly number[], radii: number | readonly number[], options?: BeeswarmOptions): number[];
|
|
37
|
+
//# sourceMappingURL=dodge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dodge.d.ts","sourceRoot":"","sources":["../../src/math/dodge.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;GAMG;AACH,wBAAgB,SAAS,CACxB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,SAAM,GACX,CAAC,MAAM,EAAE,MAAM,CAAC,CAIlB;AAED,qBAAqB;AACrB,MAAM,WAAW,eAAe;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC;IACxC,+FAA+F;IAC/F,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC9B,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,KAAK,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,EACjC,OAAO,GAAE,eAAoB,GAC3B,MAAM,EAAE,CA6DV"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** Empirical CDF: a step function rising from 0 to 1 by `1/n` at each observed value. */
|
|
2
|
+
/**
|
|
3
|
+
* Step data shaped for `stairsPolyline`/`<Stairs>`: `edges.length === values.length + 1`.
|
|
4
|
+
*
|
|
5
|
+
* @category Math & helpers
|
|
6
|
+
*/
|
|
7
|
+
export interface EcdfSteps {
|
|
8
|
+
edges: number[];
|
|
9
|
+
values: number[];
|
|
10
|
+
}
|
|
11
|
+
/** @category Math */
|
|
12
|
+
export interface EcdfOptions {
|
|
13
|
+
/**
|
|
14
|
+
* Padding left of the smallest value and right of the largest, in data units. Defaults to 5% of
|
|
15
|
+
* the data's span (0.5 when the span is 0).
|
|
16
|
+
*/
|
|
17
|
+
pad?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* `EcdfOptions.pad`'s fraction-of-span default.
|
|
21
|
+
*
|
|
22
|
+
* @category Math & helpers
|
|
23
|
+
*/
|
|
24
|
+
export declare const DEFAULT_ECDF_PAD_FRACTION = 0.05;
|
|
25
|
+
/**
|
|
26
|
+
* `EcdfOptions.pad`'s fallback when the data's span is 0 (every value identical).
|
|
27
|
+
*
|
|
28
|
+
* @category Math & helpers
|
|
29
|
+
*/
|
|
30
|
+
export declare const DEFAULT_ECDF_PAD_FALLBACK = 0.5;
|
|
31
|
+
/**
|
|
32
|
+
* The step function of the empirical CDF of `values`, over the sorted unique
|
|
33
|
+
* finite values `u_1 < … < u_k`: `edges = [u_1 - pad, u_1, …, u_k, u_k + pad]`
|
|
34
|
+
* and `values = [0, F(u_1), …, F(u_k)]`, so the curve is 0 before `u_1`,
|
|
35
|
+
* jumps at each value, and ends at 1.
|
|
36
|
+
*
|
|
37
|
+
* @param values - The sample; non-finite entries are dropped.
|
|
38
|
+
* @returns `edges` and `values` for {@link stairsPolyline}; both empty when no finite value remains.
|
|
39
|
+
* @category Math & helpers
|
|
40
|
+
*/
|
|
41
|
+
export declare function ecdfSteps(values: readonly number[], options?: EcdfOptions): EcdfSteps;
|
|
42
|
+
//# sourceMappingURL=ecdf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecdf.d.ts","sourceRoot":"","sources":["../../src/math/ecdf.ts"],"names":[],"mappings":"AACA,yFAAyF;AAEzF;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,qBAAqB;AACrB,MAAM,WAAW,WAAW;IAC3B;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CACxB,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,OAAO,GAAE,WAAgB,GACvB,SAAS,CAoCX"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** `errorbar(x, y, yerr, xerr)` — a marker plus optional error bars for each finite `(x, y)` pair. */
|
|
2
|
+
import type { Point } from "@sophistry/core/geometry";
|
|
3
|
+
/**
|
|
4
|
+
* Symmetric errors as one magnitude per index, or asymmetric ones as a
|
|
5
|
+
* `[lower[], upper[]]` tuple.
|
|
6
|
+
*
|
|
7
|
+
* @category Math & helpers
|
|
8
|
+
*/
|
|
9
|
+
export type ErrorSpec = readonly number[] | readonly [readonly number[], readonly number[]];
|
|
10
|
+
/** @category Math */
|
|
11
|
+
export interface ErrorBarPoint {
|
|
12
|
+
/** Index into the input `xs`/`ys`, matching a point to its row after non-finite pairs are dropped. */
|
|
13
|
+
index: number;
|
|
14
|
+
point: Point;
|
|
15
|
+
/** `[point - lower, point + upper]` along y; omitted where `yerr` has no finite magnitude here. */
|
|
16
|
+
yBar?: [Point, Point];
|
|
17
|
+
/** `[point - lower, point + upper]` along x; omitted where `xerr` has no finite magnitude here. */
|
|
18
|
+
xBar?: [Point, Point];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* One marker plus optional error bars per finite `(x, y)` pair.
|
|
22
|
+
*
|
|
23
|
+
* @param yerr - Vertical error magnitudes. See {@link ErrorSpec}.
|
|
24
|
+
* @param xerr - Horizontal error magnitudes. See {@link ErrorSpec}.
|
|
25
|
+
* @category Math & helpers
|
|
26
|
+
*/
|
|
27
|
+
export declare function errorBarPoints(xs: readonly number[], ys: readonly number[], yerr?: ErrorSpec, xerr?: ErrorSpec): ErrorBarPoint[];
|
|
28
|
+
//# sourceMappingURL=errorbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorbar.d.ts","sourceRoot":"","sources":["../../src/math/errorbar.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAGtD;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAClB,SAAS,MAAM,EAAE,GACjB,SAAS,CAAC,SAAS,MAAM,EAAE,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC;AAEnD,qBAAqB;AACrB,MAAM,WAAW,aAAa;IAC7B,sGAAsG;IACtG,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;IACb,mGAAmG;IACnG,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACtB,mGAAmG;IACnG,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;CACtB;AAmBD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC7B,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,IAAI,CAAC,EAAE,SAAS,EAChB,IAAI,CAAC,EAAE,SAAS,GACd,aAAa,EAAE,CA6BjB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Event plot: a raster of vertical tick marks, one row per sequence (e.g. spike trains). */
|
|
2
|
+
import type { Point } from "@sophistry/core/geometry";
|
|
3
|
+
/** @category Math */
|
|
4
|
+
export interface EventRow {
|
|
5
|
+
/** Index into the original `rows` — which band this row's ticks belong to. */
|
|
6
|
+
row: number;
|
|
7
|
+
/** One `[from, to]` drop-line pair per finite event time in this row. */
|
|
8
|
+
ticks: [Point, Point][];
|
|
9
|
+
}
|
|
10
|
+
/** @category Math */
|
|
11
|
+
export interface EventPlotOptions {
|
|
12
|
+
/** Data-space spacing between successive rows' y. @default 1 */
|
|
13
|
+
lineOffset?: number;
|
|
14
|
+
/** Data-space height of each tick, centred on its row's y. @default 0.8 */
|
|
15
|
+
lineLength?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* One vertical tick per finite event time, grouped by row: row `i` sits at
|
|
19
|
+
* `y = i * lineOffset`, each tick at `x = t`, `lineLength` tall. Empty rows
|
|
20
|
+
* are kept.
|
|
21
|
+
*
|
|
22
|
+
* @param rows - One array of event positions (x) per row.
|
|
23
|
+
* @returns One {@link EventRow} per input row, in order.
|
|
24
|
+
* @category Math & helpers
|
|
25
|
+
*/
|
|
26
|
+
export declare function eventPlotRows(rows: readonly (readonly number[])[], options?: EventPlotOptions): EventRow[];
|
|
27
|
+
//# sourceMappingURL=eventplot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventplot.d.ts","sourceRoot":"","sources":["../../src/math/eventplot.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAE7F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEtD,qBAAqB;AACrB,MAAM,WAAW,QAAQ;IACxB,8EAA8E;IAC9E,GAAG,EAAE,MAAM,CAAC;IACZ,yEAAyE;IACzE,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;CACxB;AAED,qBAAqB;AACrB,MAAM,WAAW,gBAAgB;IAChC,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC5B,IAAI,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EACpC,OAAO,GAAE,gBAAqB,GAC5B,QAAQ,EAAE,CAeZ"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Small multiples: which panel goes where, how big each is, and how a
|
|
3
|
+
* grid of panels reveals. Pure functions behind `<Facet>`, `<PairPlot>` and
|
|
4
|
+
* `<JointPlot>`.
|
|
5
|
+
*/
|
|
6
|
+
import type { BandKey, Bounds, Point } from "@sophistry/core/geometry";
|
|
7
|
+
/** One panel's place in a facet grid. */
|
|
8
|
+
export interface FacetSlot {
|
|
9
|
+
/** Reading-order index (row-major). */
|
|
10
|
+
index: number;
|
|
11
|
+
/** Grid row, from the top. */
|
|
12
|
+
row: number;
|
|
13
|
+
/** Grid column, from the left. */
|
|
14
|
+
column: number;
|
|
15
|
+
/** The panel's `row` category, when faceting by rows. */
|
|
16
|
+
rowKey?: BandKey;
|
|
17
|
+
/** The panel's `column` category, when faceting by columns. */
|
|
18
|
+
columnKey?: BandKey;
|
|
19
|
+
}
|
|
20
|
+
/** The grid {@link facetSlots} lays out. */
|
|
21
|
+
export interface FacetSlots {
|
|
22
|
+
slots: FacetSlot[];
|
|
23
|
+
rows: number;
|
|
24
|
+
columns: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Where each panel of a facet grid goes: with both key lists a full grid;
|
|
28
|
+
* with one, a single row (`columnKeys`) or column (`rowKeys`) wrapped after
|
|
29
|
+
* `wrap` panels; with neither, one panel.
|
|
30
|
+
*
|
|
31
|
+
* @param wrap - Panels per line when faceting by one variable.
|
|
32
|
+
*/
|
|
33
|
+
export declare function facetSlots(rowKeys: readonly BandKey[], columnKeys: readonly BandKey[], wrap?: number): FacetSlots;
|
|
34
|
+
/** Whether no panel sits directly below (or above, `"top"`) a slot: it is on the grid's outer edge there. */
|
|
35
|
+
export declare function outerEdge(slot: FacetSlot, slots: readonly FacetSlot[], side: "top" | "bottom" | "left" | "right"): boolean;
|
|
36
|
+
/** Room around a grid or panel, per side, in scene units. */
|
|
37
|
+
export interface SideRoom {
|
|
38
|
+
left: number;
|
|
39
|
+
right: number;
|
|
40
|
+
top: number;
|
|
41
|
+
bottom: number;
|
|
42
|
+
}
|
|
43
|
+
/** Options for {@link facetGrid}. */
|
|
44
|
+
export interface FacetGridOptions {
|
|
45
|
+
rows: number;
|
|
46
|
+
columns: number;
|
|
47
|
+
/** The whole footprint's width, in scene units. */
|
|
48
|
+
width: number;
|
|
49
|
+
/** The whole footprint's height. */
|
|
50
|
+
height: number;
|
|
51
|
+
/** The footprint's centre. Defaults to the origin. */
|
|
52
|
+
center?: Point;
|
|
53
|
+
/** Space between neighbouring panels' plotting areas, across a column gap. */
|
|
54
|
+
gapX: number;
|
|
55
|
+
/** Space between neighbouring panels' plotting areas, across a row gap. */
|
|
56
|
+
gapY: number;
|
|
57
|
+
/** Room kept free around the grid of plots, inside the footprint. */
|
|
58
|
+
outer?: Partial<SideRoom>;
|
|
59
|
+
/** Relative column widths. Defaults to equal. */
|
|
60
|
+
widthRatios?: readonly number[];
|
|
61
|
+
/** Relative row heights, top to bottom. Defaults to equal. */
|
|
62
|
+
heightRatios?: readonly number[];
|
|
63
|
+
}
|
|
64
|
+
/** One cell of a {@link facetGrid}: the plotting area of a panel. */
|
|
65
|
+
export interface FacetCell {
|
|
66
|
+
center: Point;
|
|
67
|
+
width: number;
|
|
68
|
+
height: number;
|
|
69
|
+
}
|
|
70
|
+
/** What {@link facetGrid} returns. */
|
|
71
|
+
export interface FacetGrid {
|
|
72
|
+
/** `cells[row][column]`, rows from the top. */
|
|
73
|
+
cells: FacetCell[][];
|
|
74
|
+
/** The box around every plotting area (the grid without its outer room). */
|
|
75
|
+
plots: Bounds;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Lays out a grid of plotting areas inside a footprint: outer room first,
|
|
79
|
+
* then the gaps, the rest shared between columns and rows by ratio. Each
|
|
80
|
+
* plot keeps at least a tenth of a unit.
|
|
81
|
+
*/
|
|
82
|
+
export declare function facetGrid(options: FacetGridOptions): FacetGrid;
|
|
83
|
+
/**
|
|
84
|
+
* A panel's reveal from the grid's: every panel's frame half at once, then
|
|
85
|
+
* the data half staggered across panels in reading order.
|
|
86
|
+
*
|
|
87
|
+
* @param stagger - Fraction of the data half spent staggering, 0..0.95.
|
|
88
|
+
* @param frameEnd - Where a panel's frame half ends. Defaults to 0.5.
|
|
89
|
+
*/
|
|
90
|
+
export declare function panelProgress(progress: number, index: number, count: number, stagger?: number, frameEnd?: number): number;
|
|
91
|
+
//# sourceMappingURL=facet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facet.d.ts","sourceRoot":"","sources":["../../src/math/facet.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEvE,yCAAyC;AACzC,MAAM,WAAW,SAAS;IACzB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+DAA+D;IAC/D,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,4CAA4C;AAC5C,MAAM,WAAW,UAAU;IAC1B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACzB,OAAO,EAAE,SAAS,OAAO,EAAE,EAC3B,UAAU,EAAE,SAAS,OAAO,EAAE,EAC9B,IAAI,CAAC,EAAE,MAAM,GACX,UAAU,CA6CZ;AAED,6GAA6G;AAC7G,wBAAgB,SAAS,CACxB,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,SAAS,SAAS,EAAE,EAC3B,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GACvC,OAAO,CAMT;AAED,6DAA6D;AAC7D,MAAM,WAAW,QAAQ;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CACf;AAED,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,KAAK,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1B,iDAAiD;IACjD,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,8DAA8D;IAC9D,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAED,qEAAqE;AACrE,MAAM,WAAW,SAAS;IACzB,MAAM,EAAE,KAAK,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAED,sCAAsC;AACtC,MAAM,WAAW,SAAS;IACzB,+CAA+C;IAC/C,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC;IACrB,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;CACd;AAgBD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,CA2C9D;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,OAAO,SAAI,EACX,QAAQ,SAAM,GACZ,MAAM,CAQR"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** The region between two series over shared `x` values: a confidence band or min/max envelope. */
|
|
2
|
+
import type { CurveKind, CurvePath, Point } from "@sophistry/core/geometry";
|
|
3
|
+
/**
|
|
4
|
+
* One ring per continuous run, returned closed (first point repeated), as
|
|
5
|
+
* the reveal walks it back to its start.
|
|
6
|
+
*
|
|
7
|
+
* @category Math & helpers
|
|
8
|
+
*/
|
|
9
|
+
export type FillBetweenRings = Point[][];
|
|
10
|
+
/**
|
|
11
|
+
* One closed ring per continuous run of `(x, y1, y2)`, split wherever a value
|
|
12
|
+
* is non-finite, so a gap shades as two regions.
|
|
13
|
+
*
|
|
14
|
+
* @param y1 - One boundary, parallel to `xs`.
|
|
15
|
+
* @param y2 - The other boundary, parallel to `xs`.
|
|
16
|
+
* @returns Closed rings, one per run of at least 2 finite points.
|
|
17
|
+
* @category Math & helpers
|
|
18
|
+
*/
|
|
19
|
+
export declare function fillBetweenRings(xs: readonly number[], y1: readonly number[], y2: readonly number[]): FillBetweenRings;
|
|
20
|
+
/**
|
|
21
|
+
* One of {@link fillBetweenRings}' rings (in any units) as a closed curve,
|
|
22
|
+
* each boundary curved on its own so a boundary shared by adjacent bands is
|
|
23
|
+
* the same curve in both. A ring of another shape is closed straight.
|
|
24
|
+
*
|
|
25
|
+
* @param ring - `n` upper points, `n` lower points reversed, the first repeated.
|
|
26
|
+
* @category Math & helpers
|
|
27
|
+
*/
|
|
28
|
+
export declare function fillBetweenCurve(ring: readonly Point[], curve: CurveKind): CurvePath;
|
|
29
|
+
//# sourceMappingURL=fillBetween.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fillBetween.d.ts","sourceRoot":"","sources":["../../src/math/fillBetween.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAEnG,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAI5E;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,EAAE,EAAE,CAAC;AAQzC;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC/B,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,EAAE,EAAE,SAAS,MAAM,EAAE,GACnB,gBAAgB,CAuBlB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC/B,IAAI,EAAE,SAAS,KAAK,EAAE,EACtB,KAAK,EAAE,SAAS,GACd,SAAS,CAMX"}
|