@howells/hairline 0.0.0-stage → 0.2.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/CHANGELOG.md +7 -0
- 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 +36 -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 +160 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface LegendProps {
|
|
2
|
+
active: number | null;
|
|
3
|
+
pid: string;
|
|
4
|
+
/** Label for the no-value key; omitted when every region has a value. */
|
|
5
|
+
emptyLabel?: string;
|
|
6
|
+
onStep: (bin: number | null) => void;
|
|
7
|
+
short: (v: number) => string;
|
|
8
|
+
thresholds: readonly number[];
|
|
9
|
+
width: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}
|
|
12
|
+
/** The key row, centred under the map: one KeySwatch per step. */
|
|
13
|
+
export declare const Legend: (props: LegendProps) => import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { NoteProps } from "../../schema/options.js";
|
|
2
|
+
import type { StateDatum } from "./us-choropleth.data.js";
|
|
3
|
+
interface USChoroplethProps extends NoteProps {
|
|
4
|
+
data?: StateDatum[];
|
|
5
|
+
/** Legend and tooltip text for states with no value. */
|
|
6
|
+
emptyLabel?: string;
|
|
7
|
+
format?: (v: number) => string;
|
|
8
|
+
/** Upper cap on the map height; otherwise the map keeps its own aspect. */
|
|
9
|
+
height?: number;
|
|
10
|
+
/** Postal code(s) printed on the map; defaults to the three states that cut most. */
|
|
11
|
+
highlight?: string | string[];
|
|
12
|
+
/** Short value for legend and labels, e.g. 96k. */
|
|
13
|
+
short?: (v: number) => string;
|
|
14
|
+
/** Four ascending breaks between the five shades. */
|
|
15
|
+
thresholds?: [number, number, number, number];
|
|
16
|
+
/** Unit after the tooltip value, e.g. "trees". */
|
|
17
|
+
unit?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* M1 Christmas trees. Real state outlines (Alaska and Hawaii inset lower left),
|
|
21
|
+
* value as a dot screen in five steps, 1px outlines, a hover tooltip
|
|
22
|
+
* and a legend scale that isolates a step.
|
|
23
|
+
*/
|
|
24
|
+
export declare const USChoropleth: (props: USChoroplethProps) => import("react").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* M1 Christmas trees: cultivated Christmas trees cut, by state, 2022.
|
|
3
|
+
* Source: USDA National Agricultural Statistics Service, 2022 Census of
|
|
4
|
+
* Agriculture, Volume 1 Chapter 2, Table 35 "Cultivated Christmas Trees: 2022
|
|
5
|
+
* and 2017", https://www.nass.usda.gov/Publications/AgCensus/2022/Full_Report/Volume_1,_Chapter_2_US_State_Level/st99_2_035_035.pdf
|
|
6
|
+
* Fetched 2026-10-15.
|
|
7
|
+
* Transform: the 2022 "Trees cut, Number" column for the 50 states, copied as
|
|
8
|
+
* printed. Alaska, Arizona and Nevada print (D), withheld to protect
|
|
9
|
+
* individual farms, and are left out so they draw as no data. The United
|
|
10
|
+
* States total (14,548,694) exceeds the 47 published states by 1,590 trees,
|
|
11
|
+
* the withheld three. The District of Columbia and Puerto Rico are not in the
|
|
12
|
+
* table and also draw as no data.
|
|
13
|
+
*/
|
|
14
|
+
import type { Region } from "./geo.js";
|
|
15
|
+
/** Every state (plus DC and Puerto Rico) keyed by postal code, from us-atlas states-10m. */
|
|
16
|
+
export declare const usStates: Region[];
|
|
17
|
+
export interface StateDatum {
|
|
18
|
+
/** USPS postal code, e.g. "CA". */
|
|
19
|
+
state: string;
|
|
20
|
+
value: number;
|
|
21
|
+
}
|
|
22
|
+
/** Cultivated Christmas trees cut by state in 2022, most first. */
|
|
23
|
+
export declare const usChoroplethDemo: StateDatum[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { NoteProps } from "../../schema/options.js";
|
|
2
|
+
import type { CountryDatum } from "./world-choropleth.data.js";
|
|
3
|
+
interface WorldChoroplethProps extends NoteProps {
|
|
4
|
+
data?: CountryDatum[];
|
|
5
|
+
/** Legend and tooltip text for countries with no value. */
|
|
6
|
+
emptyLabel?: string;
|
|
7
|
+
format?: (v: number) => string;
|
|
8
|
+
/** Upper cap on the map height; otherwise the map keeps its own aspect. */
|
|
9
|
+
height?: number;
|
|
10
|
+
/** Countries (by name) printed on the map, with their code; defaults to five leaders. */
|
|
11
|
+
highlight?: string | string[];
|
|
12
|
+
short?: (v: number) => string;
|
|
13
|
+
thresholds?: [number, number, number, number];
|
|
14
|
+
unit?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* M2 Wine drinking. Equal Earth projection, value as a dot screen in five
|
|
18
|
+
* steps, countries with no figure as bare paper, 1px outlines, a hover tooltip and a
|
|
19
|
+
* legend scale that isolates a step.
|
|
20
|
+
*/
|
|
21
|
+
export declare const WorldChoropleth: (props: WorldChoroplethProps) => import("react").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* M2 Wine drinking: litres of pure alcohol from wine per adult, 2022.
|
|
3
|
+
* Source: World Health Organization, Global Health Observatory, as published
|
|
4
|
+
* by Our World in Data (CC BY 4.0), "Wine consumption per person",
|
|
5
|
+
* https://ourworldindata.org/grapher/wine-consumption-per-capita
|
|
6
|
+
* Fetched 2026-10-15.
|
|
7
|
+
* File: wine-consumption-per-capita.csv (Entity, Code, Year, litres of pure
|
|
8
|
+
* alcohol per person aged 15 and over). Transform: the Year = 2022 rows that
|
|
9
|
+
* carry a country code (187), each value copied as it stands and joined to the
|
|
10
|
+
* Natural Earth short names the polygons use. Eleven names differ and are
|
|
11
|
+
* mapped by hand: Bosnia and Herzegovina, Central African Republic, Cote
|
|
12
|
+
* d'Ivoire, Democratic Republic of Congo, Dominican Republic, Equatorial
|
|
13
|
+
* Guinea, Solomon Islands, East Timor (Timor-Leste), United States (United
|
|
14
|
+
* States of America), Eswatini (eSwatini), North Macedonia (Macedonia). 24
|
|
15
|
+
* small states and islands in the file have no polygon at this scale and are
|
|
16
|
+
* left out. 12 polygons have no value in the file and show as no data:
|
|
17
|
+
* Falkland Is., Greenland, Kosovo, N. Cyprus, New Caledonia, Palestine,
|
|
18
|
+
* Puerto Rico, S. Sudan, Saudi Arabia, Somaliland, Taiwan and W. Sahara. A
|
|
19
|
+
* recorded 0 is a value, not a gap.
|
|
20
|
+
*/
|
|
21
|
+
import type { Region } from "./geo.js";
|
|
22
|
+
/** Every country except the Antarctic ones, keyed by Natural Earth short name, from world-atlas countries-110m. */
|
|
23
|
+
export declare const worldCountries: Region[];
|
|
24
|
+
export interface CountryDatum {
|
|
25
|
+
/** Short code printed on the map when labelled. */
|
|
26
|
+
code?: string;
|
|
27
|
+
/** Natural Earth short name, as in world-atlas ("United States of America", "Dem. Rep. Congo"). */
|
|
28
|
+
country: string;
|
|
29
|
+
/** Label offset from the country's centre in px, drawn with a leader. */
|
|
30
|
+
dx?: number;
|
|
31
|
+
dy?: number;
|
|
32
|
+
value: number;
|
|
33
|
+
}
|
|
34
|
+
/** Litres of pure alcohol from wine per person aged 15 and over, 2022, highest first. */
|
|
35
|
+
export declare const worldChoroplethDemo: CountryDatum[];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { SVGProps } from "react";
|
|
2
|
+
import type { DotSize, RingWeight } from "./marks.js";
|
|
3
|
+
import type { CapDirection } from "./shapes.js";
|
|
4
|
+
type CircleProps = Omit<SVGProps<SVGCircleElement>, "r" | "strokeWidth">;
|
|
5
|
+
/** A solid point marker of one of the four sizes; tone and motion via className. */
|
|
6
|
+
export declare const Dot: ({ size, ...rest }: CircleProps & {
|
|
7
|
+
size?: DotSize;
|
|
8
|
+
}) => import("react").JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* A hollow point marker: paper inside a ring whose outer edge sits exactly
|
|
11
|
+
* on the size's radius, the stroke drawn inside it. Pass the stroke tone in
|
|
12
|
+
* className; `open` leaves the inside see-through instead of paper.
|
|
13
|
+
*/
|
|
14
|
+
export declare const Ring: ({ className, open, size, weight, ...rest }: CircleProps & {
|
|
15
|
+
open?: boolean;
|
|
16
|
+
size?: DotSize;
|
|
17
|
+
weight?: RingWeight;
|
|
18
|
+
}) => import("react").JSX.Element;
|
|
19
|
+
type BarProps = Omit<SVGProps<SVGPathElement>, "d" | "fill"> & {
|
|
20
|
+
/** The way the bar grows from its base; its outer end is rounded. */
|
|
21
|
+
dir: CapDirection;
|
|
22
|
+
/**
|
|
23
|
+
* A texture, `paint(id)`: the bar is engraved inside a crisp 1px outline.
|
|
24
|
+
* Omit for a solid bar, toned by a fill class in className.
|
|
25
|
+
*/
|
|
26
|
+
fill?: string;
|
|
27
|
+
/** Outer box, base included: x, y, width and height in px. */
|
|
28
|
+
h: number;
|
|
29
|
+
/** The engraved outline's tone. */
|
|
30
|
+
outline?: string;
|
|
31
|
+
w: number;
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* A bar, square at its base and rounded at its outer end. Solid bars sit
|
|
37
|
+
* where the scale puts them; an engraved bar snaps its outline to the
|
|
38
|
+
* half pixel and runs a whole number of px along its length, one less
|
|
39
|
+
* across it, so the outline is crisp on every side.
|
|
40
|
+
*/
|
|
41
|
+
export declare const Bar: ({ className, dir, fill, h, outline, w, x, y, ...rest }: BarProps) => import("react").JSX.Element;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Point markers, by radius in px: the outer edge of the painted mark, so a
|
|
3
|
+
* solid dot and a hollow ring of one size cover the same ground.
|
|
4
|
+
* - xs: secondary marks on dense data, retired or minor events
|
|
5
|
+
* - sm: every point at rest, and the hover dot
|
|
6
|
+
* - md: the hero, the active point, an endpoint, the cursor ring
|
|
7
|
+
* - lg: the hero on a large-format layout with room to spare
|
|
8
|
+
*/
|
|
9
|
+
export declare const DOT: {
|
|
10
|
+
readonly lg: 6;
|
|
11
|
+
readonly md: 4.5;
|
|
12
|
+
readonly sm: 3;
|
|
13
|
+
readonly xs: 2;
|
|
14
|
+
};
|
|
15
|
+
export type DotSize = keyof typeof DOT;
|
|
16
|
+
/** A hollow ring's stroke: 1px at rest, 1.5px for the cursor or hover ring. */
|
|
17
|
+
export declare const RING_WEIGHT: {
|
|
18
|
+
readonly cursor: 1.5;
|
|
19
|
+
readonly rest: 1;
|
|
20
|
+
};
|
|
21
|
+
export type RingWeight = keyof typeof RING_WEIGHT;
|
|
22
|
+
/**
|
|
23
|
+
* Tick lengths in px, all 1px thick: a ruler's one, five and ten (sm, md,
|
|
24
|
+
* lg), and the long dimension mark (xl). Axis ticks are md. A tick centred
|
|
25
|
+
* on its line runs half its length either side.
|
|
26
|
+
*/
|
|
27
|
+
export declare const TICK: {
|
|
28
|
+
readonly lg: 9;
|
|
29
|
+
readonly md: 6;
|
|
30
|
+
readonly sm: 4;
|
|
31
|
+
readonly xl: 14;
|
|
32
|
+
};
|
|
33
|
+
export type TickSize = keyof typeof TICK;
|
|
34
|
+
/**
|
|
35
|
+
* The 2px family: hero stems, medians, caps, grips and label ticks. Rest
|
|
36
|
+
* stems are 1px; the hero's stem is 2px.
|
|
37
|
+
*/
|
|
38
|
+
export declare const MARK_WEIGHT = 2;
|
|
39
|
+
export declare const STEM: {
|
|
40
|
+
readonly hero: 2;
|
|
41
|
+
readonly rest: 1;
|
|
42
|
+
};
|
|
43
|
+
/** The tick beside a label in a column of names: 2px tall, 6px long. */
|
|
44
|
+
export declare const LABEL_TICK: {
|
|
45
|
+
readonly h: 2;
|
|
46
|
+
readonly w: 6;
|
|
47
|
+
};
|
|
48
|
+
/** Dot pitch of a dotted ring: 4 for guides and grids, 3 for a ring that marks one point. */
|
|
49
|
+
export declare const RING_STEP: {
|
|
50
|
+
readonly guide: 4;
|
|
51
|
+
readonly mark: 3;
|
|
52
|
+
};
|
|
53
|
+
/** Key swatch size, swatch-to-label gap and gap between key entries. */
|
|
54
|
+
export declare const KEY: {
|
|
55
|
+
readonly entryGap: 16;
|
|
56
|
+
readonly gap: 6;
|
|
57
|
+
readonly swatch: 12;
|
|
58
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** --hl-ease-travel, cubic-bezier(0.77, 0, 0.175, 1): ease-in-out-quart. */
|
|
2
|
+
export declare const easeTravel: (t: number) => number;
|
|
3
|
+
/** The --duration-* tokens, in ms. */
|
|
4
|
+
export declare const DURATION: {
|
|
5
|
+
readonly change: 400;
|
|
6
|
+
readonly enter: 600;
|
|
7
|
+
readonly grow: 800;
|
|
8
|
+
readonly hover: 150;
|
|
9
|
+
readonly long: 1200;
|
|
10
|
+
};
|
|
11
|
+
/** The --stagger-* tiers: dense (hundreds), fine (dozens), mark (a handful), series (a few). */
|
|
12
|
+
export type StaggerTier = "dense" | "fine" | "mark" | "series";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DayCount } from "./daily-users.data.js";
|
|
2
|
+
interface DailyUsersProps {
|
|
3
|
+
data?: DayCount[];
|
|
4
|
+
height?: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* O1 Summer of 1976. The 7-day mean as one quiet line, and every day hung from
|
|
8
|
+
* it as a stem out to its own maximum: each day reaches above the
|
|
9
|
+
* week or falls short of it, so the heatwave and the break in the weather read
|
|
10
|
+
* as a comb along the trend. The hottest day is in ink.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DailyUsers: (props: DailyUsersProps) => import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* O1 Summer of 1976: the daily maximum Central England temperature, June to
|
|
3
|
+
* August 1976.
|
|
4
|
+
* Source: Met Office Hadley Centre Central England Temperature (HadCET),
|
|
5
|
+
* v2.1.1.0 + provisional, https://www.metoffice.gov.uk/hadobs/hadcet/data/download.html
|
|
6
|
+
* Fetched 2026-10-15.
|
|
7
|
+
* File: maxtemp_daily_totals.txt (date and value to 0.1 °C, -99.9 for a
|
|
8
|
+
* missing day; none are missing in 1976). Transform: the 92 values from
|
|
9
|
+
* 1976-06-01 to 1976-08-31, copied as they stand.
|
|
10
|
+
*/
|
|
11
|
+
/** One day's maximum temperature, in °C. */
|
|
12
|
+
export interface DayCount {
|
|
13
|
+
date: Date;
|
|
14
|
+
value: number;
|
|
15
|
+
}
|
|
16
|
+
/** Daily maximum Central England temperature, June to August 1976. */
|
|
17
|
+
export declare const dailyUsers: DayCount[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FeatureUse } from "./feature-rank.data.js";
|
|
2
|
+
interface FeatureRankProps {
|
|
3
|
+
data?: FeatureUse[];
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* O3 Arable crops. Crops ranked by area in each year, set like a staff:
|
|
7
|
+
* each crop holds its rank on a rule for the quarter, then
|
|
8
|
+
* switches rows in the gap before the next. Each track is an engraved band
|
|
9
|
+
* as thick as its area: fine hatch, and the year's leader
|
|
10
|
+
* crosshatched in ink, thickening as it climbs.
|
|
11
|
+
*/
|
|
12
|
+
export declare const FeatureRank: (props: FeatureRankProps) => import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* O3 Arable crops: the area of eight arable crops in the United Kingdom,
|
|
3
|
+
* ranked in each of five years.
|
|
4
|
+
* Source: Defra with the Scottish Government, Welsh Government and DAERA,
|
|
5
|
+
* "Agricultural land use in the United Kingdom" (Open Government Licence),
|
|
6
|
+
* https://www.gov.uk/government/statistics/agricultural-land-use-in-the-united-kingdom
|
|
7
|
+
* Fetched 2026-10-15.
|
|
8
|
+
* File: Agricultural-land-use-uk-june25-20251211.ods, sheet Arable_crops (crop
|
|
9
|
+
* areas on agricultural holdings on 1 June, hectares, from the June Survey
|
|
10
|
+
* and Census of Agriculture). Transform: the rows Wheat, Barley, Oilseed rape,
|
|
11
|
+
* Oats, Field beans, Sugar beet, Potatoes and Maize (including fodder and
|
|
12
|
+
* green maize) for 1984, 1994, 2004, 2014 and 2024, in thousands of hectares
|
|
13
|
+
* to 0.1. Not shown: peas for harvesting dry and the other arable crops.
|
|
14
|
+
* Caveat from the source: from 2010 England's figures cover commercial
|
|
15
|
+
* holdings only, so the 2014 and 2024 columns are not strictly on the same
|
|
16
|
+
* footing as the earlier ones. Surveys are samples, subject to sampling error.
|
|
17
|
+
*/
|
|
18
|
+
/** One crop's area in thousands of hectares, one value per year. */
|
|
19
|
+
export interface FeatureUse {
|
|
20
|
+
feature: string;
|
|
21
|
+
weekly: number[];
|
|
22
|
+
}
|
|
23
|
+
/** The years shown, as broadsheet ticks. */
|
|
24
|
+
export declare const QUARTERS: string[];
|
|
25
|
+
/**
|
|
26
|
+
* Eight arable crops by area, 1984 to 2024. Barley led in 1984; maize climbs
|
|
27
|
+
* from last place to fourth.
|
|
28
|
+
*/
|
|
29
|
+
export declare const featureUse: FeatureUse[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface KeyItem {
|
|
3
|
+
label: string;
|
|
4
|
+
/** The mark, drawn in a 12px box centred on y = 0. */
|
|
5
|
+
mark: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface KeyProps {
|
|
8
|
+
items: KeyItem[];
|
|
9
|
+
/** Right edge of the key. */
|
|
10
|
+
right: number;
|
|
11
|
+
/** Centre line of the key. */
|
|
12
|
+
y: number;
|
|
13
|
+
}
|
|
14
|
+
/** A short key of marks and names, set in `t-axis`, flush to `right`. */
|
|
15
|
+
export declare const Key: (props: KeyProps) => import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ChannelTimes } from "./response-time.data.js";
|
|
2
|
+
interface ResponseTimeProps {
|
|
3
|
+
data?: ChannelTimes[];
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* O4 Vote share. Each party's constituency vote shares as a comb on one
|
|
7
|
+
* percentage scale: a tick at every tenth percentile over a halftone band
|
|
8
|
+
* whose dots swell where constituencies crowd. The highest median is in ink.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ResponseTime: (props: ResponseTimeProps) => import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* O4 Vote share: how each party's share of the vote ran across the
|
|
3
|
+
* constituencies it contested at the 2024 general election.
|
|
4
|
+
* Source: House of Commons Library, UK Parliament Election Results website
|
|
5
|
+
* (Open Parliament Licence), https://electionresults.parliament.uk/general-elections/6
|
|
6
|
+
* File: candidacies.csv (one row per candidate, with "Candidate vote share"
|
|
7
|
+
* as a fraction of valid votes). Fetched 2026-10-15.
|
|
8
|
+
* Transform: for each of five parties (Labour 631 candidates, Conservative
|
|
9
|
+
* 635, Reform UK 609, Liberal Democrat 630, Green 574; the five that stood
|
|
10
|
+
* in more than 570 constituencies of 650), the vote shares in percent were
|
|
11
|
+
* sorted and the 5th, 10th, 20th ... 90th and 95th percentiles taken by
|
|
12
|
+
* linear interpolation (as d3.quantileSorted does), each rounded to 0.1.
|
|
13
|
+
*/
|
|
14
|
+
/** One party's constituency vote shares, as percentiles in percent. */
|
|
15
|
+
export interface ChannelTimes {
|
|
16
|
+
channel: string;
|
|
17
|
+
/** 5th, 10th, 20th … 90th, 95th percentiles; the median is index 5. */
|
|
18
|
+
q: number[];
|
|
19
|
+
}
|
|
20
|
+
/** The percentiles kept: the 5–95 span, and every tenth between. */
|
|
21
|
+
export declare const LEVELS: number[];
|
|
22
|
+
export declare const MEDIAN = 5;
|
|
23
|
+
/** Vote share by constituency at the 2024 general election, five parties. */
|
|
24
|
+
export declare const responseTimes: ChannelTimes[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PlanRevenue } from "./revenue-by-plan.data.js";
|
|
2
|
+
interface RevenueByPlanProps {
|
|
3
|
+
data?: PlanRevenue[];
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* O2 Everyday prices. Four prices as one 0–100% ruler over a slim engraved
|
|
7
|
+
* bar, each good called out below like a dimension on a drawing: a fine tick
|
|
8
|
+
* down to its name, share and price. Under that, each price's rise on ten
|
|
9
|
+
* years earlier. The dearest good is crosshatched in ink.
|
|
10
|
+
*/
|
|
11
|
+
export declare const RevenueByPlan: (props: RevenueByPlanProps) => import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* O2 Everyday prices: four goods in 2014 and in 2024.
|
|
3
|
+
* Source: Office for National Statistics, Average prices (RPI) in dataset
|
|
4
|
+
* MM23, https://www.ons.gov.uk/economy/inflationandpriceindices/timeseries/czms/mm23
|
|
5
|
+
* Fetched 2026-10-15 (release of 16 September 2026).
|
|
6
|
+
* File: the full MM23 CSV (mm23.csv), series CZMS (draught lager, per pint),
|
|
7
|
+
* CZOH (white loaf, sliced, 800g), CZNT (milk, pasteurised, per pint) and
|
|
8
|
+
* CZNQ (tea bags, per 250g). The series' own annual rows "2014" and "2024"
|
|
9
|
+
* are the figures, in pence. Transform: pence divided by 100 to pounds, no
|
|
10
|
+
* other change. The ONS egg series (CZNU) stops in January 2022, so tea
|
|
11
|
+
* stands in for the dozen eggs the plan had.
|
|
12
|
+
*/
|
|
13
|
+
/** One good's average price in pounds, and the same good ten years earlier. */
|
|
14
|
+
export interface PlanRevenue {
|
|
15
|
+
/** The good's name. */
|
|
16
|
+
plan: string;
|
|
17
|
+
/** Its average price in 2014, in pounds. */
|
|
18
|
+
prior: number;
|
|
19
|
+
/** Its average price in 2024, in pounds. */
|
|
20
|
+
revenue: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Average shop prices, 2014 and 2024: a pint of lager is £3.37 then and
|
|
24
|
+
* £4.77 now; a loaf £1.16 then and £1.40 now.
|
|
25
|
+
*/
|
|
26
|
+
export declare const planRevenue: PlanRevenue[];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
/** Live visibility: unlike useReveal, it flips back when scrolled away. */
|
|
3
|
+
export declare const useInView: (ref: RefObject<HTMLElement | null>, threshold?: number) => boolean;
|
|
4
|
+
/** True once the box has scrolled into view, and only while it stays there. */
|
|
5
|
+
export declare const useLive: (box: RefObject<HTMLElement | null>) => boolean;
|
|
6
|
+
/** Calls `onFrame(dt)` on every animation frame while `running`; dt in ms, capped. */
|
|
7
|
+
export declare const useFrame: (running: boolean, onFrame: (dt: number) => void) => void;
|
|
8
|
+
interface PlayheadOptions {
|
|
9
|
+
/** The chart's box: playback waits for it to be revealed and on screen. */
|
|
10
|
+
box: RefObject<HTMLElement | null>;
|
|
11
|
+
/** Where playback stops; Infinity for a loop that never ends. */
|
|
12
|
+
end: number;
|
|
13
|
+
/** ms of real time per unit of the playhead. */
|
|
14
|
+
rate: number;
|
|
15
|
+
/**
|
|
16
|
+
* Under reduced motion the playhead does not glide. "end": it starts
|
|
17
|
+
* finished. "step": it starts at `start` and paused, and Play moves it a
|
|
18
|
+
* whole `step.unit` every `step.every` ms.
|
|
19
|
+
*/
|
|
20
|
+
reduced: "end" | "step";
|
|
21
|
+
/** Where a reduced-motion "step" playhead starts (default 0). */
|
|
22
|
+
start?: number;
|
|
23
|
+
step?: {
|
|
24
|
+
every: number;
|
|
25
|
+
unit: number;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A playhead from 0 to `end` that advances while playing and live. Toggle
|
|
30
|
+
* plays and pauses (and restarts once finished), seek jumps and pauses,
|
|
31
|
+
* replay starts again from 0.
|
|
32
|
+
*/
|
|
33
|
+
export declare const usePlayhead: (o: PlayheadOptions) => {
|
|
34
|
+
done: boolean;
|
|
35
|
+
handleReplay: () => void;
|
|
36
|
+
handleSeek: (k: number) => void;
|
|
37
|
+
handleToggle: () => void;
|
|
38
|
+
playing: boolean;
|
|
39
|
+
reduced: boolean;
|
|
40
|
+
t: number;
|
|
41
|
+
};
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { FontMetrics } from "../schema/metrics.js";
|
|
2
|
+
interface PlotNoteProps {
|
|
3
|
+
/** Text alignment at `x`. Defaults to "middle". */
|
|
4
|
+
anchor?: "end" | "middle" | "start";
|
|
5
|
+
/** The face's metrics for wrapping; Inter's when omitted. */
|
|
6
|
+
metrics?: FontMetrics;
|
|
7
|
+
/** Entry-stagger slot for the fade-in. Defaults to 6, after most marks. */
|
|
8
|
+
order?: number;
|
|
9
|
+
/** The footnote; " · " separates the segments it may wrap at. */
|
|
10
|
+
text?: string;
|
|
11
|
+
/** Room available for one line. */
|
|
12
|
+
width: number;
|
|
13
|
+
x: number;
|
|
14
|
+
/** Baseline of the last line; extra lines stack upward from it. */
|
|
15
|
+
y: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The in-plot unit footnote ("One dot = one day"), fading in with the
|
|
19
|
+
* labels. Wraps at " · " to fit `width` and renders nothing when even one
|
|
20
|
+
* segment can't fit. Reserve room for it with `noteSpace` from ./util,
|
|
21
|
+
* using the same width.
|
|
22
|
+
*/
|
|
23
|
+
export declare const PlotNote: (props: PlotNoteProps) => import("react").JSX.Element | null;
|
|
24
|
+
/**
|
|
25
|
+
* The footnote in its usual place: centred under the plot, 6px off the
|
|
26
|
+
* bottom of a chart `width` wide and `height` tall, `gutter` px clear of
|
|
27
|
+
* either side (8 by default; the daily charts keep 12).
|
|
28
|
+
*/
|
|
29
|
+
export declare const FootNote: (props: {
|
|
30
|
+
gutter?: number;
|
|
31
|
+
height: number;
|
|
32
|
+
metrics?: FontMetrics;
|
|
33
|
+
order?: number;
|
|
34
|
+
text?: string;
|
|
35
|
+
width: number;
|
|
36
|
+
}) => import("react").JSX.Element;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** The panel each board chart sits in. */
|
|
2
|
+
export declare const PANEL = "relative min-w-0 rounded-xs bg-panel px-2 py-3 [&_svg]:block [&_svg]:overflow-visible [&_svg]:select-none [&_svg:focus]:outline-none [&_svg:focus-visible]:outline-1 [&_svg:focus-visible]:outline-offset-4 [&_svg:focus-visible]:outline-muted [&_svg:focus-visible]:outline-solid";
|
|
3
|
+
/** Ticks, scale labels and small secondary labels (the axis role). */
|
|
4
|
+
export declare const TICK = "t-axis";
|
|
5
|
+
/** Category and series names. */
|
|
6
|
+
export declare const LABEL = "text-tick font-medium";
|
|
7
|
+
/** Data values (the value role). */
|
|
8
|
+
export declare const VALUE = "t-value";
|
|
9
|
+
/** A small heading over an HTML block, in the axis voice. */
|
|
10
|
+
export declare const CAPTION = "text-tick text-muted";
|
|
11
|
+
/** Gridlines: solid 1px hairlines, snapped. */
|
|
12
|
+
export declare const GRID_H = "grid-line";
|
|
13
|
+
export declare const GRID_V = "grid-line";
|
|
14
|
+
/** Baselines and zero rules. */
|
|
15
|
+
export declare const RULE_ZERO = "hairline";
|
|
16
|
+
/** A limit or plan line: the one dash, because it marks a target. */
|
|
17
|
+
export declare const RULE_TARGET = "stroke-l3 dash-rule shape-crisp";
|
|
18
|
+
/** The scrub cursor: a solid hairline. */
|
|
19
|
+
export declare const CURSOR = "stroke-faint shape-crisp";
|
|
20
|
+
/** The 1px rule around every textured fill. */
|
|
21
|
+
export declare const OUTLINE = "fill-none stroke-l5 shape-crisp";
|
|
22
|
+
export declare const LINE = "fill-none stroke-medium cap-round";
|
|
23
|
+
/** Cursor dots sit on the cursor (no glide) and recolour across a threshold. */
|
|
24
|
+
export declare const DOT = "transition-tone";
|
|
25
|
+
/** Scatter points swell on hover. */
|
|
26
|
+
export declare const POINT = "transition-radius";
|
|
27
|
+
/** Bars recolour as the cursor passes them. */
|
|
28
|
+
export declare const MARK = "transition-tone";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { SVGProps } from "react";
|
|
2
|
+
import type { TickSize } from "./marks.js";
|
|
3
|
+
/**
|
|
4
|
+
* What a rule is for, which sets its tone and dash. "plain" sets nothing:
|
|
5
|
+
* the tone comes in className.
|
|
6
|
+
*/
|
|
7
|
+
export type RuleKind = "cursor" | "grid" | "hairline" | "plain" | "rule" | "target";
|
|
8
|
+
type LineProps = Omit<SVGProps<SVGLineElement>, "x1" | "x2" | "y1" | "y2">;
|
|
9
|
+
/** A level rule from x0 to x1, on the half pixel of y. */
|
|
10
|
+
export declare const HRule: ({ className, kind, x0, x1, y, ...rest }: LineProps & {
|
|
11
|
+
kind?: RuleKind;
|
|
12
|
+
x0: number;
|
|
13
|
+
x1: number;
|
|
14
|
+
y: number;
|
|
15
|
+
}) => import("react").JSX.Element;
|
|
16
|
+
/** An upright rule from y0 to y1, on the half pixel of x. */
|
|
17
|
+
export declare const VRule: ({ className, kind, x, y0, y1, ...rest }: LineProps & {
|
|
18
|
+
kind?: RuleKind;
|
|
19
|
+
x: number;
|
|
20
|
+
y0: number;
|
|
21
|
+
y1: number;
|
|
22
|
+
}) => import("react").JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* A mark's stem from y0 to y1: 1px on the half pixel at rest, 2px on the
|
|
25
|
+
* whole pixel for the hero. Tone and motion come in `className`.
|
|
26
|
+
*/
|
|
27
|
+
export declare const Stem: ({ className, hero, x, y0, y1, ...rest }: LineProps & {
|
|
28
|
+
hero?: boolean;
|
|
29
|
+
x: number;
|
|
30
|
+
y0: number;
|
|
31
|
+
y1: number;
|
|
32
|
+
}) => import("react").JSX.Element;
|
|
33
|
+
/**
|
|
34
|
+
* A ruler tick at x, standing on y: hanging below it by default, or rising
|
|
35
|
+
* above it. Its length is one of the TICK sizes.
|
|
36
|
+
*/
|
|
37
|
+
export declare const Tick: ({ className, rise, size, x, y, ...rest }: LineProps & {
|
|
38
|
+
rise?: boolean;
|
|
39
|
+
size?: TickSize;
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
}) => import("react").JSX.Element;
|
|
43
|
+
/** Level gridlines at each y, from x0 to x1. */
|
|
44
|
+
export declare const HGrid: (props: {
|
|
45
|
+
className?: string;
|
|
46
|
+
x0: number;
|
|
47
|
+
x1: number;
|
|
48
|
+
ys: number[];
|
|
49
|
+
}) => import("react").JSX.Element;
|
|
50
|
+
/** Upright gridlines at each x, from y0 to y1. */
|
|
51
|
+
export declare const VGrid: (props: {
|
|
52
|
+
xs: number[];
|
|
53
|
+
y0: number;
|
|
54
|
+
y1: number;
|
|
55
|
+
}) => import("react").JSX.Element;
|
|
56
|
+
/** The scrub cursor: an upright hairline at x. */
|
|
57
|
+
export declare const Cursor: (props: {
|
|
58
|
+
x: number;
|
|
59
|
+
y0: number;
|
|
60
|
+
y1: number;
|
|
61
|
+
}) => import("react").JSX.Element;
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type CapDirection = "down" | "left" | "right" | "up";
|
|
2
|
+
/** Corner radius of a bar's outer end: small cells on the radius scale. */
|
|
3
|
+
export declare const BAR_RADIUS = 2;
|
|
4
|
+
/**
|
|
5
|
+
* A bar: square at the base, squared at the outer end with a 2px
|
|
6
|
+
* corner. `dir` is the direction the bar grows from its base. A bar shorter
|
|
7
|
+
* than its corner gets a smaller one.
|
|
8
|
+
*/
|
|
9
|
+
export declare const barPath: (x: number, y: number, w: number, h: number, dir: CapDirection) => string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PointerEvent, ReactElement, ReactNode } from "react";
|
|
2
|
+
import type { z } from "zod";
|
|
3
|
+
import type { SharedCallbacks, sharedShape } from "../schema/options.js";
|
|
4
|
+
/** The shared options as a chart's props carry them. */
|
|
5
|
+
export type SharedProps = Partial<z.infer<z.ZodObject<typeof sharedShape>>> & SharedCallbacks;
|
|
6
|
+
/** What `Plot` takes from a chart's shared options. */
|
|
7
|
+
export declare const plotOptions: (props: SharedProps) => {
|
|
8
|
+
animate: "mount" | "off" | "scroll" | undefined;
|
|
9
|
+
onReady: (() => void) | undefined;
|
|
10
|
+
replayKey: string | number | undefined;
|
|
11
|
+
scaling: {
|
|
12
|
+
fit: boolean | undefined;
|
|
13
|
+
scale: number | undefined;
|
|
14
|
+
strokes: "device" | "proportional" | undefined;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
/** A chart's ids under its `idPrefix`, when it has one. */
|
|
18
|
+
export declare const scoped: (idPrefix: string | undefined, children: ReactNode) => ReactElement;
|
|
19
|
+
/** The chart's data table: hidden for sighted readers unless `table` is set. */
|
|
20
|
+
export declare const chartTable: (props: SharedProps, caption: string, columns: string[], rows: string[][]) => ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* A pointer's x in the chart's own pixels. The svg may be shown larger or
|
|
23
|
+
* smaller than it is drawn (`scale`, `fit`), so the box is read back.
|
|
24
|
+
*/
|
|
25
|
+
export declare const pointerX: (e: PointerEvent<SVGSVGElement>, width: number) => number;
|