@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,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wind barbs over a vector-field lattice: a fixed-length shaft with ticks for magnitude. Shares
|
|
3
|
+
* its sampling and colour ramp with core's `vectorField` (`createFieldEngine`). Magnitude is
|
|
4
|
+
* read in data units; direction follows the mapped vector, so flipped or log axes turn barbs as
|
|
5
|
+
* they bend arrows.
|
|
6
|
+
*
|
|
7
|
+
* One shape node per colour band (at most `bands`, 10 by default), as
|
|
8
|
+
* `vectorField` does: a band's shafts are strokes and its pennants are filled
|
|
9
|
+
* (`ShapeGeometry.fillFrom`), which a path batch item cannot express.
|
|
10
|
+
*/
|
|
11
|
+
import type { FieldProps } from "@sophistry/core";
|
|
12
|
+
/**
|
|
13
|
+
* Props of {@link barbs}.
|
|
14
|
+
*
|
|
15
|
+
* @category Charts
|
|
16
|
+
*/
|
|
17
|
+
export interface BarbsProps extends FieldProps {
|
|
18
|
+
/**
|
|
19
|
+
* Shaft length, the same for every barb (magnitude lives in the ticks). Defaults to most of one
|
|
20
|
+
* lattice cell.
|
|
21
|
+
*/
|
|
22
|
+
length?: number;
|
|
23
|
+
/** Spacing between successive ticks. Defaults to `length / 6`. */
|
|
24
|
+
barbSpacing?: number;
|
|
25
|
+
/** Tick length. Defaults to `length / 2`. */
|
|
26
|
+
barbLength?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A lattice of wind barbs: `function` is sampled on a lattice (see `FieldProps`) and each
|
|
30
|
+
* vector, in data units, drawn as a barb whose half, full and pennant ticks encode magnitude.
|
|
31
|
+
* Zero or non-finite vectors draw nothing. One shape per colour band. See {@link barbGlyph}
|
|
32
|
+
* for the glyph alone.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* import { axes } from "@sophistry/core";
|
|
37
|
+
* import { barbs } from "@sophistry/charts";
|
|
38
|
+
*
|
|
39
|
+
* axes.create({
|
|
40
|
+
* width: 6,
|
|
41
|
+
* height: 4,
|
|
42
|
+
* xRange: [-3, 3, 1],
|
|
43
|
+
* yRange: [-2, 2, 1],
|
|
44
|
+
* children: [barbs.create({ function: (p) => ({ x: 20 - p.y * 8, y: p.x * 6 }), ramp: "viridis" })],
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @see https://sophistry.dev/guides/charts/#marks
|
|
49
|
+
* @category Charts
|
|
50
|
+
*/
|
|
51
|
+
export declare const barbs: import("@sophistry/core").Definition<BarbsProps, import("@sophistry/core/internal").CompositeNode<BarbsProps>, keyof BarbsProps>;
|
|
52
|
+
//# sourceMappingURL=barbs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barbs.d.ts","sourceRoot":"","sources":["../../src/grids/barbs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAGX,UAAU,EAMV,MAAM,iBAAiB,CAAC;AAqCzB;;;;GAIG;AACH,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC7C;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAqGD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,KAAK,kIA4BhB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A gridded layer's cells as one instances node of `rect`s: `pcolormesh`,
|
|
3
|
+
* `hist2d`, `cells`, and `imshow` when it can't be an image. Each cell is an
|
|
4
|
+
* axis-aligned box in scene units, filled from the layer's ramp, with its
|
|
5
|
+
* own opacity (`cells`' reading-order fade) and its own `progress` (the
|
|
6
|
+
* reading-order reveal of `pcolormesh`, `hist2d` and `imshow`: the fill
|
|
7
|
+
* comes up, a stroke traces). Internal to the charts.
|
|
8
|
+
*/
|
|
9
|
+
import type { CoordinateSystem, RectProps, SceneNode } from "@sophistry/core";
|
|
10
|
+
import type { Bounds, Point } from "@sophistry/core/geometry";
|
|
11
|
+
import type { BatchedMark, BatchItem } from "../batch";
|
|
12
|
+
/** One cell on one frame, in scene units. */
|
|
13
|
+
export interface CellItem extends BatchItem {
|
|
14
|
+
center: Point;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
fill: string;
|
|
18
|
+
/** The cell's opacity: the layer's `opacity`, times its fade where it fades. */
|
|
19
|
+
opacity: number;
|
|
20
|
+
/** The cell's arc-length reveal, 0..1, as a rect's `progress`. @default 1 */
|
|
21
|
+
progress?: number;
|
|
22
|
+
}
|
|
23
|
+
/** The rect instances node a cell layer draws through. */
|
|
24
|
+
export type CellRects<D extends CellItem = CellItem> = BatchedMark<D, RectProps, SceneNode<RectProps>, keyof RectProps>;
|
|
25
|
+
/**
|
|
26
|
+
* Makes the rect instances node of a cell layer. Call once, in `setup`.
|
|
27
|
+
* Entering cells fade in and leaving ones fade out under a `transition`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function createCellRects<D extends CellItem = CellItem>(): CellRects<D>;
|
|
30
|
+
/** The scene box between two data corners, grown by `bleed` on every side. */
|
|
31
|
+
export declare function cellBox(coords: Pick<CoordinateSystem, "coordsToPoint">, x0: number, y0: number, x1: number, y1: number, bleed?: number): Bounds;
|
|
32
|
+
/** A box's centre, width and height, for a {@link CellItem}. */
|
|
33
|
+
export declare function boxPlacement(box: Bounds): {
|
|
34
|
+
center: Point;
|
|
35
|
+
width: number;
|
|
36
|
+
height: number;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=cell-rects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cell-rects.d.ts","sourceRoot":"","sources":["../../src/grids/cell-rects.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE9E,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGvD,6CAA6C;AAC7C,MAAM,WAAW,QAAS,SAAQ,SAAS;IAC1C,MAAM,EAAE,KAAK,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,OAAO,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,0DAA0D;AAC1D,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ,IAAI,WAAW,CACjE,CAAC,EACD,SAAS,EACT,SAAS,CAAC,SAAS,CAAC,EACpB,MAAM,SAAS,CACf,CAAC;AAEF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAgB7E;AAED,8EAA8E;AAC9E,wBAAgB,OAAO,CACtB,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,eAAe,CAAC,EAC/C,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,KAAK,SAAI,GACP,MAAM,CASR;AAED,gEAAgE;AAChE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG;IAC1C,MAAM,EAAE,KAAK,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf,CAMA"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `cells`: a grid of categorical cells coloured by a value, the categorical
|
|
3
|
+
* heatmap. The cells are one instances node of `rect`s keyed by datum key
|
|
4
|
+
* (per-cell picking through `event.key`, colour tweens through `transition`);
|
|
5
|
+
* their text, when asked for, is one `label` per cell (text does not batch).
|
|
6
|
+
* Keyed `to`/`blend` transitions slide cells with their bands and blend
|
|
7
|
+
* their colours, each end through its own ramp.
|
|
8
|
+
*/
|
|
9
|
+
import type { ColorRampSpec } from "@sophistry/core";
|
|
10
|
+
import type { BandKey } from "@sophistry/core/geometry";
|
|
11
|
+
import type { MarkTransition } from "../batch";
|
|
12
|
+
import type { RampScaleProps } from "../color-norm";
|
|
13
|
+
import type { Channel, ColorChannel } from "../data/channels";
|
|
14
|
+
import type { KeyedTransitionProps, RevealProps } from "../props";
|
|
15
|
+
import type { TooltipSpec } from "../tooltip";
|
|
16
|
+
/**
|
|
17
|
+
* Props of {@link cells}.
|
|
18
|
+
*
|
|
19
|
+
* @category Charts
|
|
20
|
+
*/
|
|
21
|
+
export interface CellsProps<T = unknown> extends RampScaleProps, KeyedTransitionProps<T>, RevealProps {
|
|
22
|
+
/** One cell per datum. */
|
|
23
|
+
data: readonly T[];
|
|
24
|
+
/** The cell's column: a category on the band x axis. */
|
|
25
|
+
x: Channel<T, BandKey>;
|
|
26
|
+
/** The cell's row: a category on the band y axis. */
|
|
27
|
+
y: Channel<T, BandKey>;
|
|
28
|
+
/**
|
|
29
|
+
* The number the cell's colour encodes, through `ramp`. Non-finite values leave the cell out.
|
|
30
|
+
*/
|
|
31
|
+
value?: Channel<T, number>;
|
|
32
|
+
/** A colour per cell, overriding `value`'s ramp: constant or `(d, i) => colour`. */
|
|
33
|
+
color?: ColorChannel<T>;
|
|
34
|
+
/**
|
|
35
|
+
* How `value` becomes colour: a colormap name (`"viridis"`), CSS stops, or `(t) => colour`.
|
|
36
|
+
* Defaults to the theme's ramp.
|
|
37
|
+
*/
|
|
38
|
+
ramp?: ColorRampSpec;
|
|
39
|
+
/** Value at the bottom of the ramp. Defaults to the smallest value. */
|
|
40
|
+
rampMin?: number;
|
|
41
|
+
/** Value at the top of the ramp. Defaults to the largest value. */
|
|
42
|
+
rampMax?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Text in each cell: `true` writes the value, a channel writes anything. Its colour is picked
|
|
45
|
+
* to read on the fill.
|
|
46
|
+
*/
|
|
47
|
+
labels?: boolean | Channel<T, string>;
|
|
48
|
+
/**
|
|
49
|
+
* Font size of the labels.
|
|
50
|
+
* @default 0.22
|
|
51
|
+
*/
|
|
52
|
+
labelFontSize?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Gap left around each cell.
|
|
55
|
+
* @default 0.03
|
|
56
|
+
*/
|
|
57
|
+
inset?: number;
|
|
58
|
+
/**
|
|
59
|
+
* Fill opacity, 0..1.
|
|
60
|
+
* @default 1
|
|
61
|
+
*/
|
|
62
|
+
fillOpacity?: number;
|
|
63
|
+
/**
|
|
64
|
+
* Reveal, 0..1: cells fade in in reading order, top row first.
|
|
65
|
+
* @default 1
|
|
66
|
+
*/
|
|
67
|
+
progress?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Fraction of the reveal spent staggering across the cells, 0..0.95.
|
|
70
|
+
* @default 0.5
|
|
71
|
+
*/
|
|
72
|
+
stagger?: number;
|
|
73
|
+
/**
|
|
74
|
+
* Hover tooltip: `true` for a row per channel (`x`, `y`, `value`), or a template, function or
|
|
75
|
+
* options. See {@link TooltipSpec}.
|
|
76
|
+
*/
|
|
77
|
+
tooltip?: TooltipSpec<T>;
|
|
78
|
+
/**
|
|
79
|
+
* How cells move and change colour when `data` changes (outside a `to`
|
|
80
|
+
* blend): a tween or a spring in the node's tween bank; new cells fade in,
|
|
81
|
+
* removed ones fade out. Omitted, data changes are instant.
|
|
82
|
+
*/
|
|
83
|
+
transition?: MarkTransition;
|
|
84
|
+
/**
|
|
85
|
+
* Paint order; the cells' text paints one above. Defaults to `UNDER_AXES_Z_INDEX` (above the
|
|
86
|
+
* grid, under the axes).
|
|
87
|
+
*/
|
|
88
|
+
zIndex?: number;
|
|
89
|
+
/** Set to false to hide the cells. */
|
|
90
|
+
visible?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Each cell's identity across transitions; give a key to follow a datum that moves to another
|
|
93
|
+
* cell. See {@link KeyedTransitionProps}. Defaults to its (column, row) pair.
|
|
94
|
+
*/
|
|
95
|
+
key?: Channel<T, BandKey>;
|
|
96
|
+
/**
|
|
97
|
+
* The data to transition to, matched to `data` by `key`: shared cells blend colour (each end
|
|
98
|
+
* through its own ramp) and slide with their bands; others fade in or out. See {@link
|
|
99
|
+
* KeyedTransitionProps}.
|
|
100
|
+
* @see https://sophistry.dev/guides/chart-animation/#data-transitions
|
|
101
|
+
*/
|
|
102
|
+
to?: readonly T[];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* A grid of categorical cells coloured by a value: the categorical heatmap. Both axes become
|
|
106
|
+
* band axes with no gap; `labels` writes each value in a colour that reads on its cell. Must
|
|
107
|
+
* sit inside a `chart`. The cells are one instances node; tooltips resolve per cell.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```ts
|
|
111
|
+
* import { cells, chart } from "@sophistry/charts";
|
|
112
|
+
*
|
|
113
|
+
* const sales = [
|
|
114
|
+
* { month: "Jan", region: "north", total: 12 },
|
|
115
|
+
* { month: "Jan", region: "south", total: 7 },
|
|
116
|
+
* { month: "Feb", region: "north", total: 9 },
|
|
117
|
+
* { month: "Feb", region: "south", total: 11 },
|
|
118
|
+
* ];
|
|
119
|
+
* chart.create({
|
|
120
|
+
* width: 6,
|
|
121
|
+
* height: 3,
|
|
122
|
+
* colorbar: true,
|
|
123
|
+
* children: [cells.create({ data: sales, x: "month", y: "region", value: "total", labels: true })],
|
|
124
|
+
* });
|
|
125
|
+
* ```
|
|
126
|
+
*
|
|
127
|
+
* @see https://sophistry.dev/reference/chart-catalogue/#heatmaps-and-contours
|
|
128
|
+
* @category Charts
|
|
129
|
+
*/
|
|
130
|
+
export declare const cells: import("@sophistry/core").Definition<CellsProps<any>, import("@sophistry/core/internal").CompositeNode<CellsProps<any>>, keyof CellsProps<any>>;
|
|
131
|
+
//# sourceMappingURL=cells.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cells.d.ts","sourceRoot":"","sources":["../../src/grids/cells.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACX,aAAa,EAKb,MAAM,iBAAiB,CAAC;AAOzB,OAAO,KAAK,EAAE,OAAO,EAAU,MAAM,0BAA0B,CAAC;AAKhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAa,cAAc,EAAE,MAAM,eAAe,CAAC;AAI/D,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAY,MAAM,kBAAkB,CAAC;AAaxE,OAAO,KAAK,EAAY,oBAAoB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAU9C;;;;GAIG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,OAAO,CACtC,SAAQ,cAAc,EACrB,oBAAoB,CAAC,CAAC,CAAC,EACvB,WAAW;IACZ,0BAA0B;IAC1B,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;IACnB,wDAAwD;IACxD,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACvB,qDAAqD;IACrD,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAC3B,oFAAoF;IACpF,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACtC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC1B;;;;;OAKG;IACH,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC;CAClB;AA8XD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,KAAK,iJA4ChB,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `contourF`: filled contours of a gridded field, drawn as one path batch
|
|
3
|
+
* (one closed item per band, all its rings one outline). Bands come up
|
|
4
|
+
* together with their `progress` (a stroke traces),
|
|
5
|
+
* or fade in lowest first under `stagger`.
|
|
6
|
+
*/
|
|
7
|
+
import type { ColorRampSpec } from "@sophistry/core";
|
|
8
|
+
import type { RampScaleProps } from "../color-norm";
|
|
9
|
+
/**
|
|
10
|
+
* Props of {@link contourF}.
|
|
11
|
+
*
|
|
12
|
+
* @category Charts
|
|
13
|
+
*/
|
|
14
|
+
export interface ContourFProps extends RampScaleProps {
|
|
15
|
+
/** Column coordinates in data units, one per `values[row]` entry. */
|
|
16
|
+
xs: readonly number[];
|
|
17
|
+
/** Row coordinates in data units, one per `values` entry. */
|
|
18
|
+
ys: readonly number[];
|
|
19
|
+
/**
|
|
20
|
+
* `values[row][col]` is the sample at `(xs[col], ys[row])`; cells touching a non-finite sample
|
|
21
|
+
* are skipped.
|
|
22
|
+
*/
|
|
23
|
+
values: readonly (readonly number[])[];
|
|
24
|
+
/**
|
|
25
|
+
* Explicit band boundaries, or a count of evenly spaced ones spanning the data's min and max
|
|
26
|
+
* (`N` levels make `N - 1` bands; spaced along `rampScale` when set).
|
|
27
|
+
* @default 8
|
|
28
|
+
*/
|
|
29
|
+
levels?: readonly number[] | number;
|
|
30
|
+
/**
|
|
31
|
+
* Colour ramp a band's fill is sampled from, by its midpoint between the field's min and max:
|
|
32
|
+
* CSS stops, a colormap name, or `(t) => colour`. Defaults to two theme series colours.
|
|
33
|
+
*/
|
|
34
|
+
ramp?: ColorRampSpec;
|
|
35
|
+
/**
|
|
36
|
+
* Fraction of `progress` spent staggering the bands, lowest first, 0..0.95; 0 draws every band
|
|
37
|
+
* at once.
|
|
38
|
+
* @default 0
|
|
39
|
+
*/
|
|
40
|
+
stagger?: number;
|
|
41
|
+
/** One fill for every band, instead of the ramp. */
|
|
42
|
+
fill?: string;
|
|
43
|
+
/** Band outline. @default "none" */
|
|
44
|
+
stroke?: string;
|
|
45
|
+
/** Outline width. */
|
|
46
|
+
strokeWidth?: number;
|
|
47
|
+
/** Opacity 0..1. @default 1 */
|
|
48
|
+
opacity?: number;
|
|
49
|
+
/** Reveal 0..1: the bands come up together (fade in one by one under `stagger`). @default 1 */
|
|
50
|
+
progress?: number;
|
|
51
|
+
/** Paint order. Defaults to `UNDER_AXES_Z_INDEX` (above the grid, under the axes). */
|
|
52
|
+
zIndex?: number;
|
|
53
|
+
/** Set to false to hide the bands. */
|
|
54
|
+
visible?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Filled contours of a gridded field: one band between consecutive levels, coloured by the
|
|
58
|
+
* band's midpoint; samples outside the levels are left blank. Paints under the axes by default
|
|
59
|
+
* (`zIndex` `UNDER_AXES_Z_INDEX`). Inside a `chart` or `axes`; drawn as one path batch. For
|
|
60
|
+
* lines use `contour`. See {@link contourBands} for the geometry alone.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* import { chart, contourF } from "@sophistry/charts";
|
|
65
|
+
*
|
|
66
|
+
* const xs = [-2, -1, 0, 1, 2];
|
|
67
|
+
* const ys = [-2, -1, 0, 1, 2];
|
|
68
|
+
* const values = ys.map((y) => xs.map((x) => Math.exp(-(x * x + y * y) / 2)));
|
|
69
|
+
* chart.create({
|
|
70
|
+
* width: 6,
|
|
71
|
+
* height: 4,
|
|
72
|
+
* colorbar: true,
|
|
73
|
+
* children: [contourF.create({ xs, ys, values, levels: 8, ramp: "viridis" })],
|
|
74
|
+
* });
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @see https://sophistry.dev/reference/chart-catalogue/#heatmaps-and-contours
|
|
78
|
+
* @category Charts
|
|
79
|
+
*/
|
|
80
|
+
export declare const contourF: import("@sophistry/core").Definition<ContourFProps, import("@sophistry/core/internal").CompositeNode<ContourFProps>, keyof ContourFProps>;
|
|
81
|
+
//# sourceMappingURL=contour-f.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contour-f.d.ts","sourceRoot":"","sources":["../../src/grids/contour-f.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACX,aAAa,EAKb,MAAM,iBAAiB,CAAC;AAQzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAuBpD;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,cAAc;IACpD,qEAAqE;IACrE,EAAE,EAAE,SAAS,MAAM,EAAE,CAAC;IACtB,6DAA6D;IAC7D,EAAE,EAAE,SAAS,MAAM,EAAE,CAAC;IACtB;;;OAGG;IACH,MAAM,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC;IACvC;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAAC;IACpC;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAqGD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,QAAQ,2IAgCnB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the contour layers share (`contour`, `contourF`, `triContour`,
|
|
3
|
+
* `triContourF`): the default two-colour ramp, the colour of a level or a
|
|
4
|
+
* band, and their path batch items. Lines and bands have an outline each, so
|
|
5
|
+
* every contour layer is one path batch: a line draws along its length (the
|
|
6
|
+
* item's `progress`), a band comes up with its
|
|
7
|
+
* `progress` or fades through its opacity. Internal to the charts.
|
|
8
|
+
*/
|
|
9
|
+
import type { ColorRampSpec, CoordinateSystem, PathBatchItem } from "@sophistry/core";
|
|
10
|
+
import type { Point } from "@sophistry/core/geometry";
|
|
11
|
+
import type { Colormap, Theme } from "@sophistry/core/themes";
|
|
12
|
+
import type { ColorNorm } from "../color-norm";
|
|
13
|
+
/** The contours' colormap: the given ramp, else two theme series colours. */
|
|
14
|
+
export declare function contourRamp(spec: ColorRampSpec | undefined, theme: Theme): Colormap;
|
|
15
|
+
/** A level's colour: its place on the norm, else between the field's min and max. */
|
|
16
|
+
export declare function levelColor(ramp: Colormap, norm: ColorNorm | undefined, extent: readonly [number, number], level: number): string;
|
|
17
|
+
/** A band's colour: its middle along the norm (a geometric mean on a log norm), else its midpoint between the field's min and max. */
|
|
18
|
+
export declare function bandColor(ramp: Colormap, norm: ColorNorm | undefined, extent: readonly [number, number], lo: number, hi: number): string;
|
|
19
|
+
/** One iso-line placed in scene units, with what its reveal reads. */
|
|
20
|
+
export interface PlacedLine {
|
|
21
|
+
item: PathBatchItem;
|
|
22
|
+
level: number;
|
|
23
|
+
}
|
|
24
|
+
/** Iso-lines as open path batch items in scene units, stroked by level. */
|
|
25
|
+
export declare function placeLines(lines: readonly {
|
|
26
|
+
level: number;
|
|
27
|
+
points: readonly Point[];
|
|
28
|
+
}[], coords: Pick<CoordinateSystem, "coordsToPoint">, strokeOf: (level: number) => string): PlacedLine[];
|
|
29
|
+
/**
|
|
30
|
+
* The lines at this frame of the reveal: whole at 1 (the placed items),
|
|
31
|
+
* traced along their length below it (the placed outline with that
|
|
32
|
+
* `progress`, so its arc length is measured once), left out at 0.
|
|
33
|
+
*/
|
|
34
|
+
export declare function revealLines(placed: readonly PlacedLine[], revealOf: (level: number) => number): PathBatchItem[];
|
|
35
|
+
/** One band placed in scene units. */
|
|
36
|
+
export interface PlacedBand {
|
|
37
|
+
item: PathBatchItem;
|
|
38
|
+
loLevel: number;
|
|
39
|
+
}
|
|
40
|
+
/** Bands as closed path batch items in scene units (all of a band's rings one item). */
|
|
41
|
+
export declare function placeBands(bands: readonly {
|
|
42
|
+
loLevel: number;
|
|
43
|
+
hiLevel: number;
|
|
44
|
+
polygons: readonly (readonly Point[])[];
|
|
45
|
+
}[], coords: Pick<CoordinateSystem, "coordsToPoint">, fillOf: (lo: number, hi: number) => string): PlacedBand[];
|
|
46
|
+
/**
|
|
47
|
+
* The bands at this frame of a reveal: whole at 1, each band's fill coming
|
|
48
|
+
* up (and any stroke tracing) with its `progress` below it, left out at 0.
|
|
49
|
+
* Unstaggered `contourF` bands use it.
|
|
50
|
+
*/
|
|
51
|
+
export declare function revealBands(placed: readonly PlacedBand[], revealOf: (level: number) => number): PathBatchItem[];
|
|
52
|
+
/** The bands at this frame of a fade: kept whole at 1, faded below it, left out at 0. */
|
|
53
|
+
export declare function fadeBands(placed: readonly PlacedBand[], fadeOf: (level: number) => number): PathBatchItem[];
|
|
54
|
+
//# sourceMappingURL=contour-shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contour-shared.d.ts","sourceRoot":"","sources":["../../src/grids/contour-shared.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACX,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG/C,6EAA6E;AAC7E,wBAAgB,WAAW,CAC1B,IAAI,EAAE,aAAa,GAAG,SAAS,EAC/B,KAAK,EAAE,KAAK,GACV,QAAQ,CAKV;AAED,qFAAqF;AACrF,wBAAgB,UAAU,CACzB,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EACjC,KAAK,EAAE,MAAM,GACX,MAAM,CAIR;AAED,sIAAsI;AACtI,wBAAgB,SAAS,CACxB,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EACjC,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACR,MAAM,CAKR;AAED,sEAAsE;AACtE,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,2EAA2E;AAC3E,wBAAgB,UAAU,CACzB,KAAK,EAAE,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAA;CAAE,EAAE,EAC7D,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,eAAe,CAAC,EAC/C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GACjC,UAAU,EAAE,CAWd;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAC1B,MAAM,EAAE,SAAS,UAAU,EAAE,EAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GACjC,aAAa,EAAE,CAEjB;AAgBD,sCAAsC;AACtC,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,wFAAwF;AACxF,wBAAgB,UAAU,CACzB,KAAK,EAAE,SAAS;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC,SAAS,KAAK,EAAE,CAAC,EAAE,CAAC;CACxC,EAAE,EACH,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,eAAe,CAAC,EAC/C,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,MAAM,GACxC,UAAU,EAAE,CASd;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAC1B,MAAM,EAAE,SAAS,UAAU,EAAE,EAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GACjC,aAAa,EAAE,CAEjB;AAED,yFAAyF;AACzF,wBAAgB,SAAS,CACxB,MAAM,EAAE,SAAS,UAAU,EAAE,EAC7B,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAC/B,aAAa,EAAE,CAQjB"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `contour`: iso-lines of a gridded field, drawn as one path batch (one open
|
|
3
|
+
* item per connected line, stroked by its level). The reveal draws each
|
|
4
|
+
* line along its length (the item's `progress`), staggered by level when
|
|
5
|
+
* asked.
|
|
6
|
+
*/
|
|
7
|
+
import type { ColorRampSpec } from "@sophistry/core";
|
|
8
|
+
import type { Colormap } from "@sophistry/core/themes";
|
|
9
|
+
import type { ColorNorm, RampScaleProps } from "../color-norm";
|
|
10
|
+
/**
|
|
11
|
+
* Props of {@link contour}.
|
|
12
|
+
*
|
|
13
|
+
* @category Charts
|
|
14
|
+
*/
|
|
15
|
+
export interface ContourProps extends RampScaleProps {
|
|
16
|
+
/** Column coordinates in data units, one per `values[row]` entry. */
|
|
17
|
+
xs: readonly number[];
|
|
18
|
+
/** Row coordinates in data units, one per `values` entry. */
|
|
19
|
+
ys: readonly number[];
|
|
20
|
+
/**
|
|
21
|
+
* `values[row][col]` is the sample at `(xs[col], ys[row])`; cells touching a non-finite sample
|
|
22
|
+
* are skipped.
|
|
23
|
+
*/
|
|
24
|
+
values: readonly (readonly number[])[];
|
|
25
|
+
/**
|
|
26
|
+
* Explicit iso-line values, or a count of evenly spaced levels strictly between the data's min
|
|
27
|
+
* and max (spaced along `rampScale` when set).
|
|
28
|
+
* @default 8
|
|
29
|
+
*/
|
|
30
|
+
levels?: readonly number[] | number;
|
|
31
|
+
/**
|
|
32
|
+
* Colour ramp a level's colour is sampled from, by where it falls between the field's min and
|
|
33
|
+
* max: CSS stops, a colormap name, or `(t) => colour`. Defaults to two theme series colours.
|
|
34
|
+
*/
|
|
35
|
+
ramp?: ColorRampSpec;
|
|
36
|
+
/**
|
|
37
|
+
* Fraction of `progress` spent staggering the levels, lowest first, 0..0.95; 0 draws every line
|
|
38
|
+
* at once.
|
|
39
|
+
* @default 0
|
|
40
|
+
*/
|
|
41
|
+
stagger?: number;
|
|
42
|
+
/** One colour for every line, instead of the ramp. */
|
|
43
|
+
stroke?: string;
|
|
44
|
+
/** Line width. */
|
|
45
|
+
strokeWidth?: number;
|
|
46
|
+
/** Opacity 0..1. @default 1 */
|
|
47
|
+
opacity?: number;
|
|
48
|
+
/** Reveal 0..1: each line draws along its length. @default 1 */
|
|
49
|
+
progress?: number;
|
|
50
|
+
/** Paint order. */
|
|
51
|
+
zIndex?: number;
|
|
52
|
+
/** Set to false to hide the lines. */
|
|
53
|
+
visible?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/** The colour norm a contour layer asks for (a log or diverging scale), or undefined (linear). */
|
|
56
|
+
export interface ContourColors {
|
|
57
|
+
norm: ColorNorm | undefined;
|
|
58
|
+
ramp: Colormap;
|
|
59
|
+
extent: [number, number];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Contour lines of a gridded field: one line per connected iso-line, coloured by its level.
|
|
63
|
+
* An explicit `stroke` colours every line the same. Inside a `chart` or `axes`; drawn as one
|
|
64
|
+
* path batch. For filled bands use `contourF`. See {@link contourLines} for the geometry
|
|
65
|
+
* alone.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* import { chart, contour } from "@sophistry/charts";
|
|
70
|
+
*
|
|
71
|
+
* const xs = [-2, -1, 0, 1, 2];
|
|
72
|
+
* const ys = [-2, -1, 0, 1, 2];
|
|
73
|
+
* const values = ys.map((y) => xs.map((x) => x * x - y * y));
|
|
74
|
+
* chart.create({
|
|
75
|
+
* width: 6,
|
|
76
|
+
* height: 4,
|
|
77
|
+
* children: [contour.create({ xs, ys, values, levels: 6, ramp: "viridis" })],
|
|
78
|
+
* });
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @see https://sophistry.dev/reference/chart-catalogue/#heatmaps-and-contours
|
|
82
|
+
* @category Charts
|
|
83
|
+
*/
|
|
84
|
+
export declare const contour: import("@sophistry/core").Definition<ContourProps, import("@sophistry/core/internal").CompositeNode<ContourProps>, keyof ContourProps>;
|
|
85
|
+
//# sourceMappingURL=contour.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contour.d.ts","sourceRoot":"","sources":["../../src/grids/contour.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACX,aAAa,EAKb,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAoB/D;;;;GAIG;AACH,MAAM,WAAW,YAAa,SAAQ,cAAc;IACnD,qEAAqE;IACrE,EAAE,EAAE,SAAS,MAAM,EAAE,CAAC;IACtB,6DAA6D;IAC7D,EAAE,EAAE,SAAS,MAAM,EAAE,CAAC;IACtB;;;OAGG;IACH,MAAM,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC;IACvC;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAAC;IACpC;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,kGAAkG;AAClG,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzB;AAwFD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,OAAO,wIA8BlB,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `dendrogram`: a clustering's merge tree in a chart's margin, drawn as one
|
|
3
|
+
* path batch (one open item per bracket arm). Merges replay lowest first;
|
|
4
|
+
* each arm draws along its length (the item's `progress`).
|
|
5
|
+
*/
|
|
6
|
+
import type { ColorInput } from "@sophistry/core/color";
|
|
7
|
+
import type { BandKey } from "@sophistry/core/geometry";
|
|
8
|
+
import type { ClusterNode } from "../math/cluster";
|
|
9
|
+
/**
|
|
10
|
+
* Props of {@link dendrogram}.
|
|
11
|
+
*
|
|
12
|
+
* @category Charts
|
|
13
|
+
*/
|
|
14
|
+
export interface DendrogramProps {
|
|
15
|
+
/**
|
|
16
|
+
* The merge tree, from {@link clusterRows} or {@link linkageTree}: each leaf's `index` is a
|
|
17
|
+
* position in `categories`, each merge's `height` its linkage distance.
|
|
18
|
+
*/
|
|
19
|
+
tree: ClusterNode | null | undefined;
|
|
20
|
+
/** The band-axis category of each clustered row: leaf `index` `i` stands at `categories[i]`. */
|
|
21
|
+
categories: readonly BandKey[];
|
|
22
|
+
/**
|
|
23
|
+
* The band axis the leaves stand on.
|
|
24
|
+
* @default "y"
|
|
25
|
+
*/
|
|
26
|
+
axis?: "x" | "y";
|
|
27
|
+
/**
|
|
28
|
+
* Which side of the plotting area the dendrogram stands on, in the margin (it reserves room
|
|
29
|
+
* there). Move the axis names to the other side to keep the tree against the grid. Defaults to
|
|
30
|
+
* `"left"` for `axis="y"`, `"top"` for `axis="x"`.
|
|
31
|
+
*/
|
|
32
|
+
side?: "left" | "right" | "top" | "bottom";
|
|
33
|
+
/**
|
|
34
|
+
* How far the root stands from the leaves.
|
|
35
|
+
* @default 0.8
|
|
36
|
+
*/
|
|
37
|
+
size?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Gap between the plotting area's edge and the leaves.
|
|
40
|
+
* @default 0.08
|
|
41
|
+
*/
|
|
42
|
+
gap?: number;
|
|
43
|
+
/** Line colour. Defaults to the theme foreground. */
|
|
44
|
+
color?: ColorInput;
|
|
45
|
+
/**
|
|
46
|
+
* Line width.
|
|
47
|
+
* @default 0.02
|
|
48
|
+
*/
|
|
49
|
+
strokeWidth?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Line opacity, 0..1.
|
|
52
|
+
* @default 0.7
|
|
53
|
+
*/
|
|
54
|
+
opacity?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Reveal, 0..1: merges appear in clustering order, lowest first, each bracket rising to its
|
|
57
|
+
* height.
|
|
58
|
+
* @default 1
|
|
59
|
+
*/
|
|
60
|
+
progress?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Fraction of the reveal spent staggering the merges, 0..0.95.
|
|
63
|
+
* @default 0.6
|
|
64
|
+
*/
|
|
65
|
+
stagger?: number;
|
|
66
|
+
/** Paint order. */
|
|
67
|
+
zIndex?: number;
|
|
68
|
+
/** Set to false to hide the tree. */
|
|
69
|
+
visible?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A dendrogram in the margin of a `chart` with a band axis: a clustering's merge tree as
|
|
73
|
+
* elbow brackets, each leaf at its category's band and each merge as far out as its linkage
|
|
74
|
+
* distance. It reports its leaf order, so an unordered axis follows it. `heatmap` with
|
|
75
|
+
* `cluster` draws these for you; use this with `cells` to compose one by hand. Drawn as one
|
|
76
|
+
* path batch.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* import { cells, chart, clusterRows, dendrogram } from "@sophistry/charts";
|
|
81
|
+
*
|
|
82
|
+
* const rows = ["a", "b", "c"];
|
|
83
|
+
* const columns = ["x", "y"];
|
|
84
|
+
* const matrix = [
|
|
85
|
+
* [1, 2],
|
|
86
|
+
* [1.2, 1.9],
|
|
87
|
+
* [5, 0],
|
|
88
|
+
* ];
|
|
89
|
+
* const data = rows.flatMap((row, r) => columns.map((column, c) => ({ row, column, v: matrix[r][c] })));
|
|
90
|
+
* const { root } = clusterRows(matrix);
|
|
91
|
+
* chart.create({
|
|
92
|
+
* width: 4,
|
|
93
|
+
* height: 4,
|
|
94
|
+
* children: [
|
|
95
|
+
* cells.create({ data, x: "column", y: "row", value: "v" }),
|
|
96
|
+
* dendrogram.create({ tree: root, categories: rows, side: "left" }),
|
|
97
|
+
* ],
|
|
98
|
+
* });
|
|
99
|
+
* ```
|
|
100
|
+
*
|
|
101
|
+
* @see https://sophistry.dev/reference/chart-catalogue/#heatmaps-and-contours
|
|
102
|
+
* @category Charts
|
|
103
|
+
*/
|
|
104
|
+
export declare const dendrogram: import("@sophistry/core").Definition<DendrogramProps, import("@sophistry/core/internal").CompositeNode<DendrogramProps>, keyof DendrogramProps>;
|
|
105
|
+
//# sourceMappingURL=dendrogram.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dendrogram.d.ts","sourceRoot":"","sources":["../../src/grids/dendrogram.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAS,MAAM,0BAA0B,CAAC;AAK/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAYnD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC/B;;;OAGG;IACH,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,gGAAgG;IAChG,UAAU,EAAE,SAAS,OAAO,EAAE,CAAC;IAC/B;;;OAGG;IACH,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC3C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAuLD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,UAAU,iJA4BrB,CAAC"}
|