@howells/hairline 0.0.0-stage → 0.1.0
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 +148 -2
- package/lib/charts/axes.js +5 -0
- package/lib/charts/basics/candlestick.data.js +44 -0
- package/lib/charts/basics/candlestick.js +180 -0
- package/lib/charts/basics/daily-empty.js +24 -0
- package/lib/charts/basics/daily-readings.js +16 -0
- package/lib/charts/basics/dot-heat.data.js +225 -0
- package/lib/charts/basics/dot-heat.js +174 -0
- package/lib/charts/basics/dumbbell-queue.js +203 -0
- package/lib/charts/basics/hairline-area.js +208 -0
- package/lib/charts/basics/hairline-line.js +195 -0
- package/lib/charts/basics/nested-treemap.data.js +55 -0
- package/lib/charts/basics/nested-treemap.js +191 -0
- package/lib/charts/basics/paired-rungs.data.js +31 -0
- package/lib/charts/basics/paired-rungs.js +151 -0
- package/lib/charts/basics/plumb-scatter.js +229 -0
- package/lib/charts/basics/rung-bars.js +178 -0
- package/lib/charts/basics/rung-geometry.js +6 -0
- package/lib/charts/basics/rung-histogram.data.js +73 -0
- package/lib/charts/basics/rung-histogram.js +153 -0
- package/lib/charts/basics/rung-waterfall.data.js +30 -0
- package/lib/charts/basics/rung-waterfall.js +150 -0
- package/lib/charts/basics/rungs.js +22 -0
- package/lib/charts/basics/series-key.js +26 -0
- package/lib/charts/basics/stacked-rungs.data.js +42 -0
- package/lib/charts/basics/stacked-rungs.js +174 -0
- package/lib/charts/basics/stream-ribbon.data.js +124 -0
- package/lib/charts/basics/stream-ribbon.js +336 -0
- package/lib/charts/basics/tick-box.data.js +50 -0
- package/lib/charts/basics/tick-box.js +226 -0
- package/lib/charts/basics/tick-donut.data.js +30 -0
- package/lib/charts/basics/tick-donut.js +210 -0
- package/lib/charts/basics/tick-gauge.data.js +8 -0
- package/lib/charts/basics/tick-gauge.js +169 -0
- package/lib/charts/basics/tick-rows.data.js +30 -0
- package/lib/charts/basics/tick-rows.js +121 -0
- package/lib/charts/basics/util-a.js +15 -0
- package/lib/charts/basics/util-b.js +13 -0
- package/lib/charts/big/circular-graph.data.js +827 -0
- package/lib/charts/big/circular-graph.js +289 -0
- package/lib/charts/big/force-galaxy-model.js +167 -0
- package/lib/charts/big/force-galaxy.data.js +813 -0
- package/lib/charts/big/force-galaxy.js +276 -0
- package/lib/charts/big/thread-triptych.data.js +204 -0
- package/lib/charts/big/thread-triptych.js +334 -0
- package/lib/charts/board/room.js +6 -0
- package/lib/charts/board/slope.js +176 -0
- package/lib/charts/board/spread.js +28 -0
- package/lib/charts/control.js +18 -0
- package/lib/charts/core.js +84 -0
- package/lib/charts/data-table.js +34 -0
- package/lib/charts/fills.js +153 -0
- package/lib/charts/forms/area-difference.data.js +62 -0
- package/lib/charts/forms/area-difference.js +192 -0
- package/lib/charts/forms/brush-math.js +42 -0
- package/lib/charts/forms/brush-strip.js +199 -0
- package/lib/charts/forms/brushed-overview.data.js +374 -0
- package/lib/charts/forms/brushed-overview.js +162 -0
- package/lib/charts/forms/chord-ring.data.js +140 -0
- package/lib/charts/forms/chord-ring.js +167 -0
- package/lib/charts/forms/circle-pack.data.js +80 -0
- package/lib/charts/forms/circle-pack.js +99 -0
- package/lib/charts/forms/hatched-stack.data.js +71 -0
- package/lib/charts/forms/hatched-stack.js +228 -0
- package/lib/charts/forms/radial-year.data.js +13 -0
- package/lib/charts/forms/radial-year.js +156 -0
- package/lib/charts/frame.js +73 -0
- package/lib/charts/glance/aggregate-sankey.data.js +74 -0
- package/lib/charts/glance/aggregate-sankey.js +242 -0
- package/lib/charts/glance/bar-race.data.js +122 -0
- package/lib/charts/glance/bar-race.js +246 -0
- package/lib/charts/glance/big-slice.data.js +41 -0
- package/lib/charts/glance/big-slice.js +238 -0
- package/lib/charts/glance/chunky-bars.data.js +22 -0
- package/lib/charts/glance/chunky-bars.js +113 -0
- package/lib/charts/glance/circular-graph.data.js +146 -0
- package/lib/charts/glance/circular-graph.js +138 -0
- package/lib/charts/glance/control-slot.js +9 -0
- package/lib/charts/glance/diverging-bar.data.js +34 -0
- package/lib/charts/glance/diverging-bar.js +154 -0
- package/lib/charts/glance/dot-waffle.data.js +26 -0
- package/lib/charts/glance/dot-waffle.js +179 -0
- package/lib/charts/glance/draw-in.data.js +9 -0
- package/lib/charts/glance/draw-in.goals.json.js +289 -0
- package/lib/charts/glance/draw-in.js +214 -0
- package/lib/charts/glance/dynamic-stream.data.js +6 -0
- package/lib/charts/glance/dynamic-stream.js +189 -0
- package/lib/charts/glance/force-graph.data.js +77 -0
- package/lib/charts/glance/force-graph.js +211 -0
- package/lib/charts/glance/jitter-strip.data.js +10 -0
- package/lib/charts/glance/jitter-strip.easter.json.js +430 -0
- package/lib/charts/glance/jitter-strip.js +157 -0
- package/lib/charts/glance/link-bundle.js +51 -0
- package/lib/charts/glance/matrix-heat-glance.data.js +108 -0
- package/lib/charts/glance/matrix-heat-glance.js +170 -0
- package/lib/charts/glance/pictorial-bar.data.js +22 -0
- package/lib/charts/glance/pictorial-bar.js +180 -0
- package/lib/charts/glance/rainfall-dual-area.data.js +177 -0
- package/lib/charts/glance/rainfall-dual-area.js +192 -0
- package/lib/charts/glance/rank-strip.data.js +76 -0
- package/lib/charts/glance/rank-strip.js +172 -0
- package/lib/charts/glance/scatter-labels.js +60 -0
- package/lib/charts/glance/scatter-morph.data.js +78 -0
- package/lib/charts/glance/scatter-morph.js +338 -0
- package/lib/charts/glance/single-axis.data.js +6 -0
- package/lib/charts/glance/single-axis.js +150 -0
- package/lib/charts/glance/single-axis.tides.json.js +180 -0
- package/lib/charts/glance/stagger-wave.data.js +66 -0
- package/lib/charts/glance/stagger-wave.js +132 -0
- package/lib/charts/glance/tree-lr.data.js +41 -0
- package/lib/charts/glance/tree-lr.js +135 -0
- package/lib/charts/glance/util-a.js +49 -0
- package/lib/charts/glance/util-b.js +19 -0
- package/lib/charts/glance/violin.data.js +9 -0
- package/lib/charts/glance/violin.js +185 -0
- package/lib/charts/glance/violin.tenors.json.js +5 -0
- package/lib/charts/hooks.js +154 -0
- package/lib/charts/hover.js +19 -0
- package/lib/charts/lupi/arc-matrix.data.js +83 -0
- package/lib/charts/lupi/arc-matrix.js +146 -0
- package/lib/charts/lupi/ballot-tally.data.js +22 -0
- package/lib/charts/lupi/ballot-tally.js +125 -0
- package/lib/charts/lupi/barcode-lollipop.data.js +195 -0
- package/lib/charts/lupi/barcode-lollipop.js +161 -0
- package/lib/charts/lupi/brand-spectrum.data.js +70 -0
- package/lib/charts/lupi/brand-spectrum.js +233 -0
- package/lib/charts/lupi/bubble-almanac.data.js +689 -0
- package/lib/charts/lupi/bubble-almanac.js +164 -0
- package/lib/charts/lupi/calendar-heat.data.js +399 -0
- package/lib/charts/lupi/calendar-heat.js +175 -0
- package/lib/charts/lupi/cluster-field.data.js +83 -0
- package/lib/charts/lupi/cluster-field.js +173 -0
- package/lib/charts/lupi/dot-cascade.data.js +54 -0
- package/lib/charts/lupi/dot-cascade.js +124 -0
- package/lib/charts/lupi/dotty-matrix.data.js +170 -0
- package/lib/charts/lupi/dotty-matrix.js +126 -0
- package/lib/charts/lupi/hourglass-stream.data.js +30 -0
- package/lib/charts/lupi/hourglass-stream.js +158 -0
- package/lib/charts/lupi/hundred-field.data.js +38 -0
- package/lib/charts/lupi/hundred-field.js +237 -0
- package/lib/charts/lupi/launch-fan.data.js +315 -0
- package/lib/charts/lupi/launch-fan.js +198 -0
- package/lib/charts/lupi/matrix-heat.data.js +97 -0
- package/lib/charts/lupi/matrix-heat.js +246 -0
- package/lib/charts/lupi/parallel-coordinates.data.js +54 -0
- package/lib/charts/lupi/parallel-coordinates.js +218 -0
- package/lib/charts/lupi/radial-convergence.data.js +178 -0
- package/lib/charts/lupi/radial-convergence.js +208 -0
- package/lib/charts/lupi/radial-patchwork.data.js +454 -0
- package/lib/charts/lupi/radial-patchwork.js +181 -0
- package/lib/charts/lupi/ridgeline.data.js +1834 -0
- package/lib/charts/lupi/ridgeline.js +195 -0
- package/lib/charts/lupi/trend-lineage.data.js +51 -0
- package/lib/charts/lupi/trend-lineage.js +198 -0
- package/lib/charts/lupi/type-colonnade.data.js +18 -0
- package/lib/charts/lupi/type-colonnade.js +198 -0
- package/lib/charts/lupi/util-a.js +14 -0
- package/lib/charts/lupi/util-b.js +12 -0
- package/lib/charts/maps/choropleth.js +295 -0
- package/lib/charts/maps/geo.js +84 -0
- package/lib/charts/maps/legend.js +83 -0
- package/lib/charts/maps/step-fill.js +9 -0
- package/lib/charts/maps/us-choropleth.data.js +249 -0
- package/lib/charts/maps/us-choropleth.js +41 -0
- package/lib/charts/maps/world-choropleth.data.js +681 -0
- package/lib/charts/maps/world-choropleth.js +46 -0
- package/lib/charts/markers.js +35 -0
- package/lib/charts/marks.js +31 -0
- package/lib/charts/motion.js +11 -0
- package/lib/charts/originals/daily-users.data.js +101 -0
- package/lib/charts/originals/daily-users.js +203 -0
- package/lib/charts/originals/feature-rank.data.js +92 -0
- package/lib/charts/originals/feature-rank.js +167 -0
- package/lib/charts/originals/format.js +5 -0
- package/lib/charts/originals/key.js +26 -0
- package/lib/charts/originals/response-time.data.js +98 -0
- package/lib/charts/originals/response-time.js +187 -0
- package/lib/charts/originals/revenue-by-plan.data.js +26 -0
- package/lib/charts/originals/revenue-by-plan.js +248 -0
- package/lib/charts/playback.js +68 -0
- package/lib/charts/plot-note.js +27 -0
- package/lib/charts/roles.js +5 -0
- package/lib/charts/rules.js +66 -0
- package/lib/charts/scale-context.js +6 -0
- package/lib/charts/shapes.js +8 -0
- package/lib/charts/shared-options.js +25 -0
- package/lib/charts/svg.js +43 -0
- package/lib/charts/text.js +30 -0
- package/lib/charts/texture-ids.js +20 -0
- package/lib/charts/texture.js +286 -0
- package/lib/charts/util.js +43 -0
- package/lib/charts/value-grid.js +26 -0
- package/lib/draw.js +27 -0
- package/lib/entries/dumbbell-queue.js +2 -0
- package/lib/entries/hairline-area.js +2 -0
- package/lib/entries/hairline-line.js +2 -0
- package/lib/entries/plumb-scatter.js +2 -0
- package/lib/entries/rung-bars.js +2 -0
- package/lib/entries/slope.js +2 -0
- package/lib/frame.js +2 -0
- package/lib/hairline.css +1385 -0
- package/lib/index.js +72 -0
- package/lib/json-schema/dumbbell-queue.json +258 -0
- package/lib/json-schema/hairline-area.json +262 -0
- package/lib/json-schema/hairline-line.json +256 -0
- package/lib/json-schema/index.json +50 -0
- package/lib/json-schema/plumb-scatter.json +363 -0
- package/lib/json-schema/rung-bars.json +230 -0
- package/lib/json-schema/slope.json +333 -0
- package/lib/kit.js +16 -0
- package/lib/lib/format.js +29 -0
- package/lib/lib/random.js +8 -0
- package/lib/maps.js +4 -0
- package/lib/schema/daily.js +9 -0
- package/lib/schema/dumbbell-queue.js +28 -0
- package/lib/schema/format.js +72 -0
- package/lib/schema/hairline-area.js +24 -0
- package/lib/schema/hairline-line.js +23 -0
- package/lib/schema/key.js +4 -0
- package/lib/schema/metrics.js +26 -0
- package/lib/schema/motion.js +12 -0
- package/lib/schema/options.js +21 -0
- package/lib/schema/plumb-scatter.js +48 -0
- package/lib/schema/registry.js +132 -0
- package/lib/schema/rung-bars.js +25 -0
- package/lib/schema/scale.js +9 -0
- package/lib/schema/slope.js +28 -0
- package/lib/schema/validate.js +25 -0
- package/lib/schema.js +16 -0
- package/lib/theme/derive.js +98 -0
- package/lib/theme.css +443 -0
- package/lib/theme.js +1 -0
- package/lib/tokens.css +306 -0
- package/lib/types/charts/axes.d.ts +14 -0
- package/lib/types/charts/basics/candlestick.d.ts +22 -0
- package/lib/types/charts/basics/candlestick.data.d.ts +10 -0
- package/lib/types/charts/basics/daily-empty.d.ts +7 -0
- package/lib/types/charts/basics/daily-readings.d.ts +38 -0
- package/lib/types/charts/basics/dot-heat.d.ts +19 -0
- package/lib/types/charts/basics/dot-heat.data.d.ts +28 -0
- package/lib/types/charts/basics/dumbbell-queue.d.ts +15 -0
- package/lib/types/charts/basics/hairline-area.d.ts +18 -0
- package/lib/types/charts/basics/hairline-line.d.ts +18 -0
- package/lib/types/charts/basics/nested-treemap.d.ts +18 -0
- package/lib/types/charts/basics/nested-treemap.data.d.ts +30 -0
- package/lib/types/charts/basics/paired-rungs.d.ts +21 -0
- package/lib/types/charts/basics/paired-rungs.data.d.ts +43 -0
- package/lib/types/charts/basics/plumb-scatter.d.ts +14 -0
- package/lib/types/charts/basics/rung-bars.d.ts +16 -0
- package/lib/types/charts/basics/rung-geometry.d.ts +6 -0
- package/lib/types/charts/basics/rung-histogram.d.ts +22 -0
- package/lib/types/charts/basics/rung-histogram.data.d.ts +34 -0
- package/lib/types/charts/basics/rung-waterfall.d.ts +19 -0
- package/lib/types/charts/basics/rung-waterfall.data.d.ts +31 -0
- package/lib/types/charts/basics/rungs.d.ts +28 -0
- package/lib/types/charts/basics/series-key.d.ts +19 -0
- package/lib/types/charts/basics/stacked-rungs.d.ts +20 -0
- package/lib/types/charts/basics/stacked-rungs.data.d.ts +26 -0
- package/lib/types/charts/basics/stream-ribbon.d.ts +19 -0
- package/lib/types/charts/basics/stream-ribbon.data.d.ts +29 -0
- package/lib/types/charts/basics/tick-box.d.ts +19 -0
- package/lib/types/charts/basics/tick-box.data.d.ts +30 -0
- package/lib/types/charts/basics/tick-donut.d.ts +24 -0
- package/lib/types/charts/basics/tick-donut.data.d.ts +25 -0
- package/lib/types/charts/basics/tick-gauge.d.ts +22 -0
- package/lib/types/charts/basics/tick-gauge.data.d.ts +24 -0
- package/lib/types/charts/basics/tick-rows.d.ts +18 -0
- package/lib/types/charts/basics/tick-rows.data.d.ts +23 -0
- package/lib/types/charts/basics/util-a.d.ts +10 -0
- package/lib/types/charts/basics/util-b.d.ts +13 -0
- package/lib/types/charts/big/circular-graph.d.ts +20 -0
- package/lib/types/charts/big/circular-graph.data.d.ts +46 -0
- package/lib/types/charts/big/force-galaxy-model.d.ts +109 -0
- package/lib/types/charts/big/force-galaxy.d.ts +18 -0
- package/lib/types/charts/big/force-galaxy.data.d.ts +48 -0
- package/lib/types/charts/big/thread-triptych.d.ts +17 -0
- package/lib/types/charts/big/thread-triptych.data.d.ts +41 -0
- package/lib/types/charts/board/room.d.ts +18 -0
- package/lib/types/charts/board/slope.d.ts +14 -0
- package/lib/types/charts/board/spread.d.ts +5 -0
- package/lib/types/charts/control.d.ts +17 -0
- package/lib/types/charts/core.d.ts +77 -0
- package/lib/types/charts/data-table.d.ts +18 -0
- package/lib/types/charts/fills.d.ts +103 -0
- package/lib/types/charts/forms/area-difference.d.ts +9 -0
- package/lib/types/charts/forms/area-difference.data.d.ts +26 -0
- package/lib/types/charts/forms/brush-math.d.ts +19 -0
- package/lib/types/charts/forms/brush-strip.d.ts +19 -0
- package/lib/types/charts/forms/brushed-overview.d.ts +12 -0
- package/lib/types/charts/forms/brushed-overview.data.d.ts +16 -0
- package/lib/types/charts/forms/chord-ring.d.ts +12 -0
- package/lib/types/charts/forms/chord-ring.data.d.ts +29 -0
- package/lib/types/charts/forms/circle-pack.d.ts +9 -0
- package/lib/types/charts/forms/circle-pack.data.d.ts +23 -0
- package/lib/types/charts/forms/hatched-stack.d.ts +10 -0
- package/lib/types/charts/forms/hatched-stack.data.d.ts +36 -0
- package/lib/types/charts/forms/radial-year.d.ts +8 -0
- package/lib/types/charts/forms/radial-year.data.d.ts +17 -0
- package/lib/types/charts/frame.d.ts +21 -0
- package/lib/types/charts/glance/aggregate-sankey.d.ts +23 -0
- package/lib/types/charts/glance/aggregate-sankey.data.d.ts +32 -0
- package/lib/types/charts/glance/bar-race.d.ts +20 -0
- package/lib/types/charts/glance/bar-race.data.d.ts +32 -0
- package/lib/types/charts/glance/big-slice.d.ts +27 -0
- package/lib/types/charts/glance/big-slice.data.d.ts +30 -0
- package/lib/types/charts/glance/chunky-bars.d.ts +18 -0
- package/lib/types/charts/glance/chunky-bars.data.d.ts +24 -0
- package/lib/types/charts/glance/circular-graph.d.ts +19 -0
- package/lib/types/charts/glance/circular-graph.data.d.ts +43 -0
- package/lib/types/charts/glance/control-slot.d.ts +9 -0
- package/lib/types/charts/glance/diverging-bar.d.ts +19 -0
- package/lib/types/charts/glance/diverging-bar.data.d.ts +27 -0
- package/lib/types/charts/glance/dot-waffle.d.ts +19 -0
- package/lib/types/charts/glance/dot-waffle.data.d.ts +31 -0
- package/lib/types/charts/glance/draw-in.d.ts +20 -0
- package/lib/types/charts/glance/draw-in.data.d.ts +6 -0
- package/lib/types/charts/glance/dynamic-stream.d.ts +22 -0
- package/lib/types/charts/glance/dynamic-stream.data.d.ts +7 -0
- package/lib/types/charts/glance/force-graph.d.ts +16 -0
- package/lib/types/charts/glance/force-graph.data.d.ts +45 -0
- package/lib/types/charts/glance/jitter-strip.d.ts +24 -0
- package/lib/types/charts/glance/jitter-strip.data.d.ts +27 -0
- package/lib/types/charts/glance/link-bundle.d.ts +22 -0
- package/lib/types/charts/glance/matrix-heat-glance.d.ts +22 -0
- package/lib/types/charts/glance/matrix-heat-glance.data.d.ts +35 -0
- package/lib/types/charts/glance/pictorial-bar.d.ts +20 -0
- package/lib/types/charts/glance/pictorial-bar.data.d.ts +27 -0
- package/lib/types/charts/glance/rainfall-dual-area.d.ts +19 -0
- package/lib/types/charts/glance/rainfall-dual-area.data.d.ts +32 -0
- package/lib/types/charts/glance/rank-strip.d.ts +19 -0
- package/lib/types/charts/glance/rank-strip.data.d.ts +36 -0
- package/lib/types/charts/glance/scatter-labels.d.ts +23 -0
- package/lib/types/charts/glance/scatter-morph.d.ts +22 -0
- package/lib/types/charts/glance/scatter-morph.data.d.ts +30 -0
- package/lib/types/charts/glance/single-axis.d.ts +27 -0
- package/lib/types/charts/glance/single-axis.data.d.ts +6 -0
- package/lib/types/charts/glance/stagger-wave.d.ts +18 -0
- package/lib/types/charts/glance/stagger-wave.data.d.ts +26 -0
- package/lib/types/charts/glance/tree-lr.d.ts +16 -0
- package/lib/types/charts/glance/tree-lr.data.d.ts +27 -0
- package/lib/types/charts/glance/util-a.d.ts +31 -0
- package/lib/types/charts/glance/util-b.d.ts +12 -0
- package/lib/types/charts/glance/violin.d.ts +22 -0
- package/lib/types/charts/glance/violin.data.d.ts +24 -0
- package/lib/types/charts/hooks.d.ts +109 -0
- package/lib/types/charts/hover.d.ts +26 -0
- package/lib/types/charts/lupi/arc-matrix.d.ts +18 -0
- package/lib/types/charts/lupi/arc-matrix.data.d.ts +28 -0
- package/lib/types/charts/lupi/ballot-tally.d.ts +19 -0
- package/lib/types/charts/lupi/ballot-tally.data.d.ts +28 -0
- package/lib/types/charts/lupi/barcode-lollipop.d.ts +19 -0
- package/lib/types/charts/lupi/barcode-lollipop.data.d.ts +26 -0
- package/lib/types/charts/lupi/brand-spectrum.d.ts +28 -0
- package/lib/types/charts/lupi/brand-spectrum.data.d.ts +34 -0
- package/lib/types/charts/lupi/bubble-almanac.d.ts +22 -0
- package/lib/types/charts/lupi/bubble-almanac.data.d.ts +45 -0
- package/lib/types/charts/lupi/calendar-heat.d.ts +19 -0
- package/lib/types/charts/lupi/calendar-heat.data.d.ts +20 -0
- package/lib/types/charts/lupi/cluster-field.d.ts +21 -0
- package/lib/types/charts/lupi/cluster-field.data.d.ts +52 -0
- package/lib/types/charts/lupi/dot-cascade.d.ts +22 -0
- package/lib/types/charts/lupi/dot-cascade.data.d.ts +24 -0
- package/lib/types/charts/lupi/dotty-matrix.d.ts +17 -0
- package/lib/types/charts/lupi/dotty-matrix.data.d.ts +32 -0
- package/lib/types/charts/lupi/hourglass-stream.d.ts +18 -0
- package/lib/types/charts/lupi/hourglass-stream.data.d.ts +27 -0
- package/lib/types/charts/lupi/hundred-field.d.ts +18 -0
- package/lib/types/charts/lupi/hundred-field.data.d.ts +24 -0
- package/lib/types/charts/lupi/launch-fan.d.ts +37 -0
- package/lib/types/charts/lupi/launch-fan.data.d.ts +41 -0
- package/lib/types/charts/lupi/matrix-heat.d.ts +20 -0
- package/lib/types/charts/lupi/matrix-heat.data.d.ts +29 -0
- package/lib/types/charts/lupi/parallel-coordinates.d.ts +23 -0
- package/lib/types/charts/lupi/parallel-coordinates.data.d.ts +40 -0
- package/lib/types/charts/lupi/radial-convergence.d.ts +15 -0
- package/lib/types/charts/lupi/radial-convergence.data.d.ts +24 -0
- package/lib/types/charts/lupi/radial-patchwork.d.ts +16 -0
- package/lib/types/charts/lupi/radial-patchwork.data.d.ts +35 -0
- package/lib/types/charts/lupi/ridgeline.d.ts +23 -0
- package/lib/types/charts/lupi/ridgeline.data.d.ts +19 -0
- package/lib/types/charts/lupi/trend-lineage.d.ts +18 -0
- package/lib/types/charts/lupi/trend-lineage.data.d.ts +56 -0
- package/lib/types/charts/lupi/type-colonnade.d.ts +20 -0
- package/lib/types/charts/lupi/type-colonnade.data.d.ts +30 -0
- package/lib/types/charts/lupi/util-a.d.ts +9 -0
- package/lib/types/charts/lupi/util-b.d.ts +11 -0
- package/lib/types/charts/maps/choropleth.d.ts +33 -0
- package/lib/types/charts/maps/geo.d.ts +48 -0
- package/lib/types/charts/maps/legend.d.ts +14 -0
- package/lib/types/charts/maps/step-fill.d.ts +6 -0
- package/lib/types/charts/maps/us-choropleth.d.ts +25 -0
- package/lib/types/charts/maps/us-choropleth.data.d.ts +23 -0
- package/lib/types/charts/maps/world-choropleth.d.ts +22 -0
- package/lib/types/charts/maps/world-choropleth.data.d.ts +35 -0
- package/lib/types/charts/markers.d.ts +42 -0
- package/lib/types/charts/marks.d.ts +58 -0
- package/lib/types/charts/motion.d.ts +12 -0
- package/lib/types/charts/originals/daily-users.d.ts +13 -0
- package/lib/types/charts/originals/daily-users.data.d.ts +17 -0
- package/lib/types/charts/originals/feature-rank.d.ts +13 -0
- package/lib/types/charts/originals/feature-rank.data.d.ts +29 -0
- package/lib/types/charts/originals/format.d.ts +2 -0
- package/lib/types/charts/originals/key.d.ts +16 -0
- package/lib/types/charts/originals/response-time.d.ts +11 -0
- package/lib/types/charts/originals/response-time.data.d.ts +24 -0
- package/lib/types/charts/originals/revenue-by-plan.d.ts +12 -0
- package/lib/types/charts/originals/revenue-by-plan.data.d.ts +26 -0
- package/lib/types/charts/playback.d.ts +42 -0
- package/lib/types/charts/plot-note.d.ts +37 -0
- package/lib/types/charts/roles.d.ts +28 -0
- package/lib/types/charts/rules.d.ts +62 -0
- package/lib/types/charts/scale-context.d.ts +3 -0
- package/lib/types/charts/shapes.d.ts +9 -0
- package/lib/types/charts/shared-options.d.ts +25 -0
- package/lib/types/charts/svg.d.ts +24 -0
- package/lib/types/charts/text.d.ts +36 -0
- package/lib/types/charts/texture-ids.d.ts +24 -0
- package/lib/types/charts/texture.d.ts +185 -0
- package/lib/types/charts/util.d.ts +66 -0
- package/lib/types/charts/value-grid.d.ts +22 -0
- package/lib/types/draw.d.ts +279 -0
- package/lib/types/entries/dumbbell-queue.d.ts +2 -0
- package/lib/types/entries/hairline-area.d.ts +2 -0
- package/lib/types/entries/hairline-line.d.ts +2 -0
- package/lib/types/entries/plumb-scatter.d.ts +2 -0
- package/lib/types/entries/rung-bars.d.ts +2 -0
- package/lib/types/entries/slope.d.ts +2 -0
- package/lib/types/frame.d.ts +2 -0
- package/lib/types/index.d.ts +82 -0
- package/lib/types/kit.d.ts +22 -0
- package/lib/types/lib/format.d.ts +58 -0
- package/lib/types/lib/random.d.ts +5 -0
- package/lib/types/maps.d.ts +2 -0
- package/lib/types/schema/daily.d.ts +14 -0
- package/lib/types/schema/dumbbell-queue.d.ts +91 -0
- package/lib/types/schema/format.d.ts +101 -0
- package/lib/types/schema/hairline-area.d.ts +83 -0
- package/lib/types/schema/hairline-line.d.ts +85 -0
- package/lib/types/schema/key.d.ts +12 -0
- package/lib/types/schema/metrics.d.ts +26 -0
- package/lib/types/schema/motion.d.ts +22 -0
- package/lib/types/schema/options.d.ts +51 -0
- package/lib/types/schema/plumb-scatter.d.ts +124 -0
- package/lib/types/schema/registry.d.ts +309 -0
- package/lib/types/schema/rung-bars.d.ts +84 -0
- package/lib/types/schema/scale.d.ts +34 -0
- package/lib/types/schema/slope.d.ts +120 -0
- package/lib/types/schema/validate.d.ts +29 -0
- package/lib/types/schema.d.ts +30 -0
- package/lib/types/theme/derive.d.ts +23 -0
- package/lib/types/theme.d.ts +2 -0
- package/lib/vendor/us-atlas/states-10m.json.js +13855 -0
- package/lib/vendor/world-atlas/countries-110m.json.js +9357 -0
- package/package.json +162 -4
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useHover as e } from "../hooks.js";
|
|
3
|
+
import { Plot as t, Tooltip as n } from "../core.js";
|
|
4
|
+
import { noteOf as r, noteSpace as i, sansWidth as a, stagger as o, wrapWords as s } from "../util.js";
|
|
5
|
+
import { DimGroup as c, TipText as l } from "../hover.js";
|
|
6
|
+
import { TICK as u } from "../marks.js";
|
|
7
|
+
import { Dot as d } from "../markers.js";
|
|
8
|
+
import { PlotNote as f } from "../plot-note.js";
|
|
9
|
+
import { HRule as p, VRule as m } from "../rules.js";
|
|
10
|
+
import { ChartSvg as h } from "../svg.js";
|
|
11
|
+
import { Label as g } from "../text.js";
|
|
12
|
+
import { paint as _, useTextureIds as v } from "../texture-ids.js";
|
|
13
|
+
import { Hatch as y, Stipple as b } from "../texture.js";
|
|
14
|
+
import { parallelDemo as x } from "./parallel-coordinates.data.js";
|
|
15
|
+
import { scaleLinear as S } from "d3-scale";
|
|
16
|
+
import { quantile as C } from "d3-array";
|
|
17
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
18
|
+
//#region src/charts/lupi/parallel-coordinates.tsx
|
|
19
|
+
var E = u.md, D = (e) => {
|
|
20
|
+
let t = e.slice(1).map((t, n) => {
|
|
21
|
+
let r = e[n], i = (t.x - r.x) * .45;
|
|
22
|
+
return `C${r.x + i},${r.y} ${t.x - i},${t.y} ${t.x},${t.y}`;
|
|
23
|
+
});
|
|
24
|
+
return e.length > 0 ? `M${e[0].x},${e[0].y}${t.join("")}` : "";
|
|
25
|
+
}, O = (e, t) => `${D(e)}L${D(t.toReversed()).slice(1)}Z`, k = 14, A = (e, t, n) => t === 0 ? "0" : `${n(t).replace("-", "−")}${e.unit ?? ""}`, j = ({ axis: e, rug: t, index: n, x: r, top: i, bottom: a, lines: s, format: c }) => /* @__PURE__ */ T("g", {
|
|
26
|
+
className: "fade",
|
|
27
|
+
style: o(n, "mark"),
|
|
28
|
+
children: [
|
|
29
|
+
s.map((e, t) => /* @__PURE__ */ w(g, {
|
|
30
|
+
anchor: "middle",
|
|
31
|
+
muted: !0,
|
|
32
|
+
voice: "label",
|
|
33
|
+
x: r,
|
|
34
|
+
y: i - 26 - (s.length - 1 - t) * k,
|
|
35
|
+
children: e
|
|
36
|
+
}, e)),
|
|
37
|
+
/* @__PURE__ */ w(m, {
|
|
38
|
+
kind: "rule",
|
|
39
|
+
x: r,
|
|
40
|
+
y0: Math.round(i),
|
|
41
|
+
y1: Math.round(a)
|
|
42
|
+
}),
|
|
43
|
+
t.map((t) => /* @__PURE__ */ w(p, {
|
|
44
|
+
className: "stroke-l2 shape-crisp",
|
|
45
|
+
kind: "plain",
|
|
46
|
+
strokeWidth: 1,
|
|
47
|
+
x0: Math.round(r) + 1 - E,
|
|
48
|
+
x1: Math.round(r) + 1,
|
|
49
|
+
y: t
|
|
50
|
+
}, `${e.key}-${t}`)),
|
|
51
|
+
/* @__PURE__ */ w(g, {
|
|
52
|
+
middle: !0,
|
|
53
|
+
muted: !0,
|
|
54
|
+
voice: "axis",
|
|
55
|
+
x: r + 9,
|
|
56
|
+
y: i,
|
|
57
|
+
children: A(e, e.domain[1], c)
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ w(g, {
|
|
60
|
+
middle: !0,
|
|
61
|
+
muted: !0,
|
|
62
|
+
voice: "axis",
|
|
63
|
+
x: r + 9,
|
|
64
|
+
y: a,
|
|
65
|
+
children: A(e, e.domain[0], c)
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
}), M = ({ row: e, index: t, pts: n, hero: r, active: i, onEnter: a }) => {
|
|
69
|
+
let s = D(n), l = r || i === !0, u = n.at(-1);
|
|
70
|
+
return /* @__PURE__ */ T(c, {
|
|
71
|
+
dim: i === !1,
|
|
72
|
+
onPointerEnter: a,
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ w("path", {
|
|
75
|
+
className: "fill-none stroke-transparent",
|
|
76
|
+
d: s,
|
|
77
|
+
strokeWidth: 10
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ w("path", {
|
|
80
|
+
className: `draw cap-round fill-none ${l ? "stroke-hero" : "stroke-l4"}`,
|
|
81
|
+
d: s,
|
|
82
|
+
pathLength: 1,
|
|
83
|
+
strokeWidth: l ? 2 : 1,
|
|
84
|
+
style: o(r ? 14 : t, "mark")
|
|
85
|
+
}),
|
|
86
|
+
r ? n.map((n) => /* @__PURE__ */ w(d, {
|
|
87
|
+
className: "fade fill-hero",
|
|
88
|
+
cx: n.x,
|
|
89
|
+
cy: n.y,
|
|
90
|
+
size: "md",
|
|
91
|
+
style: o(t + 4, "mark")
|
|
92
|
+
}, `${e.name}-${n.x}`)) : null,
|
|
93
|
+
r && u !== void 0 && /* @__PURE__ */ w(g, {
|
|
94
|
+
middle: !0,
|
|
95
|
+
order: 16,
|
|
96
|
+
voice: "label",
|
|
97
|
+
x: u.x + 12,
|
|
98
|
+
y: u.y,
|
|
99
|
+
children: e.name
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
});
|
|
103
|
+
}, N = (e) => /* @__PURE__ */ T("g", {
|
|
104
|
+
className: "fade",
|
|
105
|
+
style: o(2, "series"),
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ T("defs", { children: [/* @__PURE__ */ w(b, {
|
|
108
|
+
id: e.ids("range"),
|
|
109
|
+
tone: "fill-l4"
|
|
110
|
+
}), /* @__PURE__ */ w(y, {
|
|
111
|
+
id: e.ids("middle"),
|
|
112
|
+
tone: "fill-l5"
|
|
113
|
+
})] }),
|
|
114
|
+
/* @__PURE__ */ w("path", {
|
|
115
|
+
className: "stroke-l5",
|
|
116
|
+
d: e.range,
|
|
117
|
+
fill: _(e.ids("range")),
|
|
118
|
+
strokeWidth: 1
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ w("path", {
|
|
121
|
+
className: "stroke-l5",
|
|
122
|
+
d: e.middle,
|
|
123
|
+
fill: _(e.ids("middle")),
|
|
124
|
+
strokeWidth: 1
|
|
125
|
+
})
|
|
126
|
+
]
|
|
127
|
+
}), P = (e, t) => {
|
|
128
|
+
let n = e.rows.map((e) => e.values[t.key] ?? t.domain[0]);
|
|
129
|
+
return [Math.min(t.domain[0], ...n), Math.max(t.domain[1], ...n)];
|
|
130
|
+
}, F = (e, t, n) => e.axes.map((r) => S().domain(P(e, r)).range([n, t])), I = (e) => a(e, 10.4), L = (e, t) => Math.max(0, ...s(e?.label ?? "", t - 10, I).map(I)) / 2, R = (e, t, n, r) => {
|
|
131
|
+
let i = e.axes.at(0), a = e.axes.at(-1), o = a === void 0 ? 0 : Math.max(...P(e, a).map((e) => I(A(a, e, n)))), s = e.rows.some((e) => e.name === r) ? 12 + I(r ?? "") : 0, c = (n) => {
|
|
132
|
+
let r = (t - n.l - n.r) / Math.max(1, e.axes.length - 1);
|
|
133
|
+
return {
|
|
134
|
+
gap: r,
|
|
135
|
+
l: Math.max(E, L(i, r)),
|
|
136
|
+
r: Math.max(L(a, r), 9 + o, s)
|
|
137
|
+
};
|
|
138
|
+
}, l = c({
|
|
139
|
+
l: 30,
|
|
140
|
+
r: 30
|
|
141
|
+
}), u = c(l);
|
|
142
|
+
for (let e = 0; e < 4 && (u.l !== l.l || u.r !== l.r); e += 1) l = u, u = c(u);
|
|
143
|
+
return {
|
|
144
|
+
gap: Math.max(l.gap, u.gap),
|
|
145
|
+
l: Math.max(l.l, u.l),
|
|
146
|
+
r: Math.max(l.r, u.r)
|
|
147
|
+
};
|
|
148
|
+
}, z = (e, t, n, r) => e.axes.map((i, a) => ({
|
|
149
|
+
x: n(a),
|
|
150
|
+
y: t[a](C(e.rows.map((e) => e.values[i.key] ?? i.domain[0]), r) ?? i.domain[0])
|
|
151
|
+
})), B = (a) => {
|
|
152
|
+
let o = a.data ?? x, c = a.height ?? 470, u = a.format ?? ((e) => `${e}`), d = e(), p = v("ranges"), m = o.rows.map((e, t) => ({
|
|
153
|
+
i: t,
|
|
154
|
+
r: e
|
|
155
|
+
})).toSorted((e, t) => Number(e.r.name === a.highlight) - Number(t.r.name === a.highlight));
|
|
156
|
+
return /* @__PURE__ */ w(t, { children: (e) => {
|
|
157
|
+
let t = Math.min(e, a.maxWidth ?? 600), g = R(o, t, u, a.highlight), _ = (e - t) / 2 + g.l, v = (e + t) / 2 - g.r, y = e - 16 - Math.abs(_ + v - e), b = c - (30 + i(r(a), y, 24)), x = (e) => _ + (v - _) * e / Math.max(1, o.axes.length - 1), S = F(o, 58, b), { gap: C } = g, E = o.axes.map((e, t) => {
|
|
158
|
+
let n = S.at(t), r = n === void 0 ? e.domain[0] : n.invert(b), i = n === void 0 ? e.domain[1] : n.invert(58);
|
|
159
|
+
return {
|
|
160
|
+
...e,
|
|
161
|
+
domain: [r, i]
|
|
162
|
+
};
|
|
163
|
+
}), D = (e) => o.axes.map((t, n) => ({
|
|
164
|
+
x: x(n),
|
|
165
|
+
y: S[n](e.values[t.key] ?? t.domain[0])
|
|
166
|
+
})), k = (e) => z(o, S, x, e), P = d.key === null ? void 0 : o.rows[d.key], L = P === void 0 ? [] : D(P);
|
|
167
|
+
return /* @__PURE__ */ T("div", {
|
|
168
|
+
className: "relative",
|
|
169
|
+
children: [/* @__PURE__ */ T(h, {
|
|
170
|
+
height: c,
|
|
171
|
+
label: `${o.rows.length} cheeses across ${o.axes.map((e) => e.label).join(", ")}`,
|
|
172
|
+
leave: d.clear,
|
|
173
|
+
title: "Twelve cheeses",
|
|
174
|
+
width: e,
|
|
175
|
+
children: [
|
|
176
|
+
/* @__PURE__ */ w(N, {
|
|
177
|
+
ids: p,
|
|
178
|
+
middle: O(k(.75), k(.25)),
|
|
179
|
+
range: O(k(1), k(0))
|
|
180
|
+
}),
|
|
181
|
+
E.map((e, t) => /* @__PURE__ */ w(j, {
|
|
182
|
+
axis: e,
|
|
183
|
+
bottom: b,
|
|
184
|
+
format: u,
|
|
185
|
+
index: t,
|
|
186
|
+
rug: [...new Set(o.rows.map((n) => S[t](n.values[e.key] ?? e.domain[0])))],
|
|
187
|
+
lines: s(e.label, C - 10, I),
|
|
188
|
+
top: 58,
|
|
189
|
+
x: x(t)
|
|
190
|
+
}, e.key)),
|
|
191
|
+
m.map(({ r: e, i: t }) => /* @__PURE__ */ w(M, {
|
|
192
|
+
active: d.key === null ? null : d.key === t,
|
|
193
|
+
hero: a.highlight === e.name,
|
|
194
|
+
index: t,
|
|
195
|
+
onEnter: d.enter(t),
|
|
196
|
+
pts: D(e),
|
|
197
|
+
row: e
|
|
198
|
+
}, e.name)),
|
|
199
|
+
/* @__PURE__ */ w(f, {
|
|
200
|
+
text: r(a),
|
|
201
|
+
width: y,
|
|
202
|
+
x: (_ + v) / 2,
|
|
203
|
+
y: c - 6
|
|
204
|
+
})
|
|
205
|
+
]
|
|
206
|
+
}), P !== void 0 && L.length > 0 && /* @__PURE__ */ w(n, {
|
|
207
|
+
x: L[Math.floor(L.length / 2)].x,
|
|
208
|
+
y: Math.min(...L.map((e) => e.y)) - 6,
|
|
209
|
+
children: /* @__PURE__ */ w(l, {
|
|
210
|
+
facts: o.axes.map((e) => `${e.label} ${A(e, P.values[e.key] ?? 0, u)}`),
|
|
211
|
+
lead: P.name
|
|
212
|
+
})
|
|
213
|
+
})]
|
|
214
|
+
});
|
|
215
|
+
} });
|
|
216
|
+
};
|
|
217
|
+
//#endregion
|
|
218
|
+
export { B as ParallelCoordinates };
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/charts/lupi/radial-convergence.data.ts
|
|
3
|
+
var e = [
|
|
4
|
+
{
|
|
5
|
+
id: "Alex",
|
|
6
|
+
theme: "2020/21"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
id: "Barbara",
|
|
10
|
+
theme: "2020/21"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: "Aiden",
|
|
14
|
+
theme: "2020/21"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: "Bella",
|
|
18
|
+
theme: "2020/21"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "Christoph",
|
|
22
|
+
theme: "2020/21"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "Darcy",
|
|
26
|
+
theme: "2020/21"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: "Evert",
|
|
30
|
+
theme: "2020/21"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "Arwen",
|
|
34
|
+
theme: "2021/22"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: "Barra",
|
|
38
|
+
theme: "2021/22"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "Malik",
|
|
42
|
+
theme: "2021/22"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "Corrie",
|
|
46
|
+
theme: "2021/22"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: "Dudley",
|
|
50
|
+
theme: "2021/22"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: "Eunice",
|
|
54
|
+
theme: "2021/22"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "Franklin",
|
|
58
|
+
theme: "2021/22"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: "Otto",
|
|
62
|
+
theme: "2022/23"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "Noa",
|
|
66
|
+
theme: "2022/23"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: "Antoni",
|
|
70
|
+
theme: "2022/23"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "Betty",
|
|
74
|
+
theme: "2022/23"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "Agnes",
|
|
78
|
+
theme: "2023/24"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "Babet",
|
|
82
|
+
theme: "2023/24"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: "Ciarán",
|
|
86
|
+
theme: "2023/24"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "Debi",
|
|
90
|
+
theme: "2023/24"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: "Elin",
|
|
94
|
+
theme: "2023/24"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "Fergus",
|
|
98
|
+
theme: "2023/24"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: "Gerrit",
|
|
102
|
+
theme: "2023/24"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: "Henk",
|
|
106
|
+
theme: "2023/24"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: "Isha",
|
|
110
|
+
theme: "2023/24"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: "Jocelyn",
|
|
114
|
+
theme: "2023/24"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: "Kathleen",
|
|
118
|
+
theme: "2023/24"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: "Lilian",
|
|
122
|
+
theme: "2023/24"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: "Ashley",
|
|
126
|
+
theme: "2024/25"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "Bert",
|
|
130
|
+
theme: "2024/25"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "Conall",
|
|
134
|
+
theme: "2024/25"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: "Darragh",
|
|
138
|
+
theme: "2024/25"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: "Éowyn",
|
|
142
|
+
theme: "2024/25"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: "Floris",
|
|
146
|
+
theme: "2024/25"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
id: "Amy",
|
|
150
|
+
theme: "2025/26"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: "Benjamin",
|
|
154
|
+
theme: "2025/26"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
id: "Claudia",
|
|
158
|
+
theme: "2025/26"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: "Bram",
|
|
162
|
+
theme: "2025/26"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
id: "Goretti",
|
|
166
|
+
theme: "2025/26"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: "Chandra",
|
|
170
|
+
theme: "2025/26"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
id: "Dave",
|
|
174
|
+
theme: "2025/26"
|
|
175
|
+
}
|
|
176
|
+
];
|
|
177
|
+
//#endregion
|
|
178
|
+
export { e as radialConvergenceDemo };
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Plot as e, Tooltip as t } from "../core.js";
|
|
3
|
+
import { clamp as n, dimClass as r, noteOf as i, noteSpace as a, sansWidth as o, stagger as s } from "../util.js";
|
|
4
|
+
import { DimGroup as c, HitCircle as l, TipText as u } from "../hover.js";
|
|
5
|
+
import { RING_STEP as d } from "../marks.js";
|
|
6
|
+
import { FootNote as f } from "../plot-note.js";
|
|
7
|
+
import { ChartSvg as p } from "../svg.js";
|
|
8
|
+
import { Label as m } from "../text.js";
|
|
9
|
+
import { DotRing as h } from "../texture.js";
|
|
10
|
+
import { argMax as g } from "./util-b.js";
|
|
11
|
+
import { clock as _ } from "./util-a.js";
|
|
12
|
+
import { radialConvergenceDemo as v } from "./radial-convergence.data.js";
|
|
13
|
+
import { useState as y } from "react";
|
|
14
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
15
|
+
//#region src/charts/lupi/radial-convergence.tsx
|
|
16
|
+
var S = (e, t) => n(t / 90, 1.4, 2.2) * Math.sqrt(e), C = .35, w = (e) => {
|
|
17
|
+
let t = e.reduce((e, t) => e + Math.sin(t * Math.PI / 180), 0), n = e.reduce((e, t) => e + Math.cos(t * Math.PI / 180), 0);
|
|
18
|
+
return (Math.atan2(t, n) * 180 / Math.PI + 360) % 360;
|
|
19
|
+
}, T = (e) => [...new Set(e.map((e) => e.theme))].map((t) => {
|
|
20
|
+
let n = e.flatMap((n, r) => n.theme === t ? [360 * r / e.length] : []);
|
|
21
|
+
return {
|
|
22
|
+
angle: w(n),
|
|
23
|
+
count: n.length,
|
|
24
|
+
theme: t
|
|
25
|
+
};
|
|
26
|
+
}), E = (e, t) => T(e).map((e) => {
|
|
27
|
+
let [n, r] = _(t.cx, t.cy, t.R * .34, e.angle);
|
|
28
|
+
return {
|
|
29
|
+
...e,
|
|
30
|
+
x: n,
|
|
31
|
+
y: r
|
|
32
|
+
};
|
|
33
|
+
}), D = (e) => {
|
|
34
|
+
let { hub: t, rim: n } = e, [r, i] = _(n.cx, n.cy, n.R + 16, t.angle), a = Math.sin(t.angle * Math.PI / 180), s = Math.abs(a) > C && n.stacked, l = o(s ? t.theme : `${t.theme} · ${t.count}`, 11), u = "middle", d = r;
|
|
35
|
+
a > C ? (u = "start", d = Math.min(r, n.width - l - 2)) : a < -.35 && (u = "end", d = Math.max(r, l + 2));
|
|
36
|
+
let f = e.focus === null || e.focus.theme === t.theme;
|
|
37
|
+
return /* @__PURE__ */ b(c, {
|
|
38
|
+
dim: !f,
|
|
39
|
+
onPointerEnter: e.onEnter,
|
|
40
|
+
children: s ? /* @__PURE__ */ x(m, {
|
|
41
|
+
anchor: u,
|
|
42
|
+
className: "fade",
|
|
43
|
+
muted: !e.hero,
|
|
44
|
+
voice: "label",
|
|
45
|
+
x: d,
|
|
46
|
+
y: i,
|
|
47
|
+
children: [/* @__PURE__ */ b("tspan", {
|
|
48
|
+
x: d,
|
|
49
|
+
dy: "-0.2em",
|
|
50
|
+
children: t.theme
|
|
51
|
+
}), /* @__PURE__ */ b("tspan", {
|
|
52
|
+
x: d,
|
|
53
|
+
dy: "1.25em",
|
|
54
|
+
children: t.count
|
|
55
|
+
})]
|
|
56
|
+
}) : /* @__PURE__ */ x(m, {
|
|
57
|
+
anchor: u,
|
|
58
|
+
className: "fade",
|
|
59
|
+
middle: !0,
|
|
60
|
+
muted: !e.hero,
|
|
61
|
+
voice: "label",
|
|
62
|
+
x: d,
|
|
63
|
+
y: i,
|
|
64
|
+
children: [
|
|
65
|
+
t.theme,
|
|
66
|
+
" · ",
|
|
67
|
+
t.count
|
|
68
|
+
]
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
}, O = ({ focused: e, hub: t, k: n, lit: i, onEnter: a, rim: o }) => {
|
|
72
|
+
let c = o.angle(n), [u, d] = _(o.cx, o.cy, o.R, c), [f, p] = _(o.cx, o.cy, o.R * .52, c), m = t.x + (f - t.x) * .25, h = t.y + (p - t.y) * .25;
|
|
73
|
+
return /* @__PURE__ */ x("g", {
|
|
74
|
+
className: r(!i),
|
|
75
|
+
onPointerEnter: () => {
|
|
76
|
+
a(u, d);
|
|
77
|
+
},
|
|
78
|
+
children: [/* @__PURE__ */ b("path", {
|
|
79
|
+
className: `draw ${e ? "stroke-l3" : "stroke-l6"}`,
|
|
80
|
+
d: `M${u},${d}C${f},${p} ${m},${h} ${t.x},${t.y}`,
|
|
81
|
+
fill: "none",
|
|
82
|
+
pathLength: 1,
|
|
83
|
+
strokeWidth: 1.5,
|
|
84
|
+
style: s(n, "fine")
|
|
85
|
+
}), /* @__PURE__ */ b(l, {
|
|
86
|
+
cx: u,
|
|
87
|
+
cy: d,
|
|
88
|
+
r: 7
|
|
89
|
+
})]
|
|
90
|
+
});
|
|
91
|
+
}, k = (e) => /* @__PURE__ */ b("g", { children: e.hubs.map((t) => /* @__PURE__ */ b("circle", {
|
|
92
|
+
className: `pop ${t.theme === e.hero ? "fill-hero" : "fill-l3"}`,
|
|
93
|
+
cx: t.x,
|
|
94
|
+
cy: t.y,
|
|
95
|
+
r: S(t.count, e.R),
|
|
96
|
+
style: s(6)
|
|
97
|
+
}, `hub-${t.theme}`)) }), A = (e, t, r, i) => {
|
|
98
|
+
let a = T(r), s = (e, t) => {
|
|
99
|
+
let n = -e - 2, r = e + 2;
|
|
100
|
+
for (let i of a) {
|
|
101
|
+
let a = Math.sin(i.angle * Math.PI / 180), s = (e + 16) * a, c = o(t && Math.abs(a) > C ? i.theme : `${i.theme} · ${i.count}`, 12);
|
|
102
|
+
a > C ? r = Math.max(r, s + c) : a < -.35 ? n = Math.min(n, s - c) : (n = Math.min(n, s - c / 2), r = Math.max(r, s + c / 2));
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
hi: r,
|
|
106
|
+
lo: n
|
|
107
|
+
};
|
|
108
|
+
}, c = (r) => {
|
|
109
|
+
let a = 240;
|
|
110
|
+
for (; a > 64 && s(a, r).hi - s(a, r).lo > e;) --a;
|
|
111
|
+
return n(Math.min(a, (t - 56 - i) / 2), 64, 240);
|
|
112
|
+
}, l = c(!1) < 130 && c(!0) > c(!1), u = c(l), d = s(u, l), f = r.length, p = Math.min(t, Math.round(2 * (u + 28) + i));
|
|
113
|
+
return {
|
|
114
|
+
plotH: p,
|
|
115
|
+
rim: {
|
|
116
|
+
R: u,
|
|
117
|
+
angle: (e) => 360 * e / f,
|
|
118
|
+
cx: (e - (d.hi - d.lo)) / 2 - d.lo,
|
|
119
|
+
cy: (p - i) / 2,
|
|
120
|
+
stacked: l,
|
|
121
|
+
width: e
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}, j = (n) => {
|
|
125
|
+
let r = n.data ?? v, o = n.height ?? 460, s = n.noun ?? "storm", [c, l] = y(null), [m, _] = y(null), C = () => {
|
|
126
|
+
l(null), _(null);
|
|
127
|
+
}, w = (e, t) => c === null || (c.item === null ? c.theme === e : c.item === t);
|
|
128
|
+
return /* @__PURE__ */ b(e, {
|
|
129
|
+
overlay: m === null ? null : /* @__PURE__ */ b(t, {
|
|
130
|
+
x: m.x,
|
|
131
|
+
y: m.y,
|
|
132
|
+
children: /* @__PURE__ */ b(u, {
|
|
133
|
+
facts: [m.value],
|
|
134
|
+
lead: m.label
|
|
135
|
+
})
|
|
136
|
+
}),
|
|
137
|
+
children: (e) => {
|
|
138
|
+
let t = a(i(n), e - 16, 20), { plotH: u, rim: m } = A(e, o, r, t), v = E(r, m), y = new Map(v.map((e) => [e.theme, e])), T = v.at(g(v.map((e) => e.count)))?.theme;
|
|
139
|
+
return /* @__PURE__ */ x(p, {
|
|
140
|
+
height: u,
|
|
141
|
+
label: `${r.length} named storms in ${v.length} seasons: ${v.map((e) => `${e.theme} ${e.count}`).join(", ")}`,
|
|
142
|
+
leave: C,
|
|
143
|
+
title: "Named storms on a rim bundled into season hubs",
|
|
144
|
+
width: e,
|
|
145
|
+
children: [
|
|
146
|
+
/* @__PURE__ */ b(h, {
|
|
147
|
+
className: "fade",
|
|
148
|
+
cx: m.cx,
|
|
149
|
+
cy: m.cy,
|
|
150
|
+
r: m.R,
|
|
151
|
+
step: d.guide,
|
|
152
|
+
tone: "fill-l4"
|
|
153
|
+
}),
|
|
154
|
+
v.map((e) => /* @__PURE__ */ b(D, {
|
|
155
|
+
focus: c,
|
|
156
|
+
hero: e.theme === T,
|
|
157
|
+
hub: e,
|
|
158
|
+
onEnter: () => {
|
|
159
|
+
l({
|
|
160
|
+
item: null,
|
|
161
|
+
theme: e.theme
|
|
162
|
+
}), _({
|
|
163
|
+
label: e.theme,
|
|
164
|
+
value: `${e.count} ${s}s`,
|
|
165
|
+
x: e.x,
|
|
166
|
+
y: e.y - S(e.count, m.R) - 4
|
|
167
|
+
});
|
|
168
|
+
},
|
|
169
|
+
rim: m
|
|
170
|
+
}, `label-${e.theme}`)),
|
|
171
|
+
r.map((e, t) => {
|
|
172
|
+
let n = y.get(e.theme);
|
|
173
|
+
return n === void 0 ? null : /* @__PURE__ */ b(O, {
|
|
174
|
+
focused: c !== null,
|
|
175
|
+
hub: n,
|
|
176
|
+
k: t,
|
|
177
|
+
lit: w(e.theme, t),
|
|
178
|
+
onEnter: (n, r) => {
|
|
179
|
+
l({
|
|
180
|
+
item: t,
|
|
181
|
+
theme: e.theme
|
|
182
|
+
}), _({
|
|
183
|
+
label: e.id,
|
|
184
|
+
value: e.theme,
|
|
185
|
+
x: n,
|
|
186
|
+
y: r - 8
|
|
187
|
+
});
|
|
188
|
+
},
|
|
189
|
+
rim: m
|
|
190
|
+
}, e.id);
|
|
191
|
+
}),
|
|
192
|
+
/* @__PURE__ */ b(k, {
|
|
193
|
+
R: m.R,
|
|
194
|
+
hero: T,
|
|
195
|
+
hubs: v
|
|
196
|
+
}),
|
|
197
|
+
/* @__PURE__ */ b(f, {
|
|
198
|
+
height: u,
|
|
199
|
+
text: i(n),
|
|
200
|
+
width: e
|
|
201
|
+
})
|
|
202
|
+
]
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
};
|
|
207
|
+
//#endregion
|
|
208
|
+
export { j as RadialConvergence };
|