@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,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { sansWidth as e } from "../util.js";
|
|
3
|
+
import { KEY as t } from "../marks.js";
|
|
4
|
+
import { Label as n } from "../text.js";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/charts/originals/key.tsx
|
|
7
|
+
var a = t.swatch, o = t.gap, s = t.entryGap, c = (t) => {
|
|
8
|
+
let c = t.items.map((t) => a + o + e(t.label, 11)), l = c.reduce((e, t) => e + t, 0) + s * Math.max(0, c.length - 1), u = t.items.map((e, n) => ({
|
|
9
|
+
at: t.right - l + c.slice(0, n).reduce((e, t) => e + t + s, 0),
|
|
10
|
+
item: e
|
|
11
|
+
}));
|
|
12
|
+
return /* @__PURE__ */ r("g", {
|
|
13
|
+
className: "fade",
|
|
14
|
+
children: u.map(({ at: e, item: s }) => /* @__PURE__ */ i("g", {
|
|
15
|
+
transform: `translate(${Math.round(e)} ${t.y})`,
|
|
16
|
+
children: [s.mark, /* @__PURE__ */ r(n, {
|
|
17
|
+
middle: !0,
|
|
18
|
+
voice: "axis",
|
|
19
|
+
x: a + o,
|
|
20
|
+
children: s.label
|
|
21
|
+
})]
|
|
22
|
+
}, s.label))
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { c as Key };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/charts/originals/response-time.data.ts
|
|
3
|
+
var e = [
|
|
4
|
+
.05,
|
|
5
|
+
.1,
|
|
6
|
+
.2,
|
|
7
|
+
.3,
|
|
8
|
+
.4,
|
|
9
|
+
.5,
|
|
10
|
+
.6,
|
|
11
|
+
.7,
|
|
12
|
+
.8,
|
|
13
|
+
.9,
|
|
14
|
+
.95
|
|
15
|
+
], t = [
|
|
16
|
+
{
|
|
17
|
+
channel: "Labour",
|
|
18
|
+
q: [
|
|
19
|
+
7.7,
|
|
20
|
+
13.1,
|
|
21
|
+
23.4,
|
|
22
|
+
30.3,
|
|
23
|
+
34.7,
|
|
24
|
+
38.5,
|
|
25
|
+
41.2,
|
|
26
|
+
44.1,
|
|
27
|
+
47.1,
|
|
28
|
+
50.5,
|
|
29
|
+
53.7
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
channel: "Conservative",
|
|
34
|
+
q: [
|
|
35
|
+
5.2,
|
|
36
|
+
7.6,
|
|
37
|
+
11.9,
|
|
38
|
+
16.3,
|
|
39
|
+
21.5,
|
|
40
|
+
25.6,
|
|
41
|
+
28.7,
|
|
42
|
+
30.9,
|
|
43
|
+
33.4,
|
|
44
|
+
36.4,
|
|
45
|
+
38.5
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
channel: "Reform UK",
|
|
50
|
+
q: [
|
|
51
|
+
4.9,
|
|
52
|
+
6.3,
|
|
53
|
+
8.8,
|
|
54
|
+
11.9,
|
|
55
|
+
13.6,
|
|
56
|
+
15.5,
|
|
57
|
+
17,
|
|
58
|
+
18.9,
|
|
59
|
+
20.9,
|
|
60
|
+
23.7,
|
|
61
|
+
25.9
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
channel: "Liberal Democrat",
|
|
66
|
+
q: [
|
|
67
|
+
2.6,
|
|
68
|
+
3.1,
|
|
69
|
+
3.7,
|
|
70
|
+
4.5,
|
|
71
|
+
5.3,
|
|
72
|
+
6.4,
|
|
73
|
+
7.8,
|
|
74
|
+
10,
|
|
75
|
+
14.1,
|
|
76
|
+
37.9,
|
|
77
|
+
45.5
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
channel: "Green Party",
|
|
82
|
+
q: [
|
|
83
|
+
3.1,
|
|
84
|
+
3.5,
|
|
85
|
+
4.2,
|
|
86
|
+
4.7,
|
|
87
|
+
5.1,
|
|
88
|
+
5.7,
|
|
89
|
+
6.5,
|
|
90
|
+
7.3,
|
|
91
|
+
9.1,
|
|
92
|
+
13,
|
|
93
|
+
17.1
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
];
|
|
97
|
+
//#endregion
|
|
98
|
+
export { e as LEVELS, t as responseTimes };
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useHover as e } from "../hooks.js";
|
|
3
|
+
import { Plot as t, Tooltip as n } from "../core.js";
|
|
4
|
+
import { sansWidth as r, stagger as i } from "../util.js";
|
|
5
|
+
import { DimGroup as a, HitRect as o, TipText as s } from "../hover.js";
|
|
6
|
+
import "../marks.js";
|
|
7
|
+
import { Stem as c, VRule as l } from "../rules.js";
|
|
8
|
+
import { ChartSvg as u } from "../svg.js";
|
|
9
|
+
import { Label as d } from "../text.js";
|
|
10
|
+
import { HALFTONE_R as f, TEXTURE_PITCH as p, paint as m, useTextureIds as h } from "../texture-ids.js";
|
|
11
|
+
import { DotScreen as g, KeySwatch as _ } from "../texture.js";
|
|
12
|
+
import { Key as v } from "./key.js";
|
|
13
|
+
import { fmtPercent as y } from "./format.js";
|
|
14
|
+
import { LEVELS as b, responseTimes as x } from "./response-time.data.js";
|
|
15
|
+
import { scaleLinear as S } from "d3-scale";
|
|
16
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
17
|
+
//#region src/charts/originals/response-time.tsx
|
|
18
|
+
var E = 30, D = 80, O = 16, k = 14, A = 18, j = [0, 60], M = f, N = 11, P = [
|
|
19
|
+
0,
|
|
20
|
+
10,
|
|
21
|
+
20,
|
|
22
|
+
30,
|
|
23
|
+
40,
|
|
24
|
+
50,
|
|
25
|
+
60
|
|
26
|
+
], F = [
|
|
27
|
+
0,
|
|
28
|
+
20,
|
|
29
|
+
40,
|
|
30
|
+
60
|
|
31
|
+
], I = (e, t) => e.slice(0, -1).map((n, r) => (b[r + 1] - b[r]) / Math.max(1, t(e[r + 1]) - t(n))), L = (e, t) => Math.min(M.length - 1, Math.floor(e / t * M.length)), R = ({ datum: e, dense: t, dim: n, frame: r, hero: s, k: l, onEnter: u, width: f }) => {
|
|
32
|
+
let h = r.rowY(l), g = e.q[5], _ = e.q.slice(1, -1).filter((e, t) => t + 1 !== 5), v = Math.round(r.x(e.q[0])), x = Math.round(h) - N, S = Math.round(r.x(e.q.at(-1) ?? 1)) - v, C = Math.floor((S - 3) / p.screen) * p.screen;
|
|
33
|
+
return /* @__PURE__ */ T(a, {
|
|
34
|
+
dim: n,
|
|
35
|
+
onPointerEnter: u,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ w(o, {
|
|
38
|
+
height: D,
|
|
39
|
+
width: f,
|
|
40
|
+
x: 0,
|
|
41
|
+
y: h - D / 2
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ w(d, {
|
|
44
|
+
middle: !0,
|
|
45
|
+
muted: !s,
|
|
46
|
+
voice: "label",
|
|
47
|
+
x: 0,
|
|
48
|
+
y: h,
|
|
49
|
+
children: e.channel
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ w("g", {
|
|
52
|
+
className: "grow-x",
|
|
53
|
+
style: i(l, "series"),
|
|
54
|
+
children: /* @__PURE__ */ T("g", {
|
|
55
|
+
transform: `translate(${v + 1} ${x + 1})`,
|
|
56
|
+
children: [/* @__PURE__ */ w("rect", {
|
|
57
|
+
className: "fill-paper stroke-l5 shape-crisp",
|
|
58
|
+
height: 22,
|
|
59
|
+
strokeWidth: 1,
|
|
60
|
+
width: Math.max(1, S - 1),
|
|
61
|
+
x: -.5,
|
|
62
|
+
y: -.5
|
|
63
|
+
}), I(e.q, r.x).map((n, i) => {
|
|
64
|
+
let a = Math.max(0, Math.round(r.x(e.q[i])) - v - 1), o = Math.min(C, Math.round(r.x(e.q[i + 1])) - v - 1);
|
|
65
|
+
return /* @__PURE__ */ w("rect", {
|
|
66
|
+
fill: m(t.tex(String(L(n, t.max)))),
|
|
67
|
+
height: 21,
|
|
68
|
+
width: Math.max(0, o - a),
|
|
69
|
+
x: a,
|
|
70
|
+
y: 0
|
|
71
|
+
}, `${e.channel}-${b[i]}`);
|
|
72
|
+
})]
|
|
73
|
+
})
|
|
74
|
+
}),
|
|
75
|
+
_.map((t, n) => /* @__PURE__ */ w(c, {
|
|
76
|
+
className: "pop stroke-l2",
|
|
77
|
+
style: i(l * 10 + n, "fine"),
|
|
78
|
+
x: r.x(t),
|
|
79
|
+
y0: Math.round(h) - k,
|
|
80
|
+
y1: Math.round(h) + k + 1
|
|
81
|
+
}, `${e.channel}-${t}`)),
|
|
82
|
+
/* @__PURE__ */ w(c, {
|
|
83
|
+
className: `pop ${s ? "stroke-ink" : "stroke-l1"}`,
|
|
84
|
+
hero: !0,
|
|
85
|
+
style: i(l * 10 + 9, "fine"),
|
|
86
|
+
x: r.x(g),
|
|
87
|
+
y0: Math.round(h) - A,
|
|
88
|
+
y1: Math.round(h) + A + 1
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ w(d, {
|
|
91
|
+
anchor: "end",
|
|
92
|
+
middle: !0,
|
|
93
|
+
muted: !s,
|
|
94
|
+
order: l + 4,
|
|
95
|
+
voice: "value",
|
|
96
|
+
x: f,
|
|
97
|
+
y: h,
|
|
98
|
+
children: y(g)
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
}, z = (e, t, n) => /* @__PURE__ */ w(c, {
|
|
103
|
+
className: t,
|
|
104
|
+
hero: n === 2,
|
|
105
|
+
x: 6,
|
|
106
|
+
y0: -e,
|
|
107
|
+
y1: e
|
|
108
|
+
}), B = (e) => [
|
|
109
|
+
{
|
|
110
|
+
label: "Median",
|
|
111
|
+
mark: z(6, "stroke-l1", 2)
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
label: "Deciles",
|
|
115
|
+
mark: z(4, "stroke-l2", 1)
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
label: "Seats",
|
|
119
|
+
mark: /* @__PURE__ */ w(_, {
|
|
120
|
+
fill: m(e(String(M.length - 1))),
|
|
121
|
+
x: 0,
|
|
122
|
+
y: -6
|
|
123
|
+
})
|
|
124
|
+
}
|
|
125
|
+
], V = ({ tex: e }) => /* @__PURE__ */ w("defs", { children: M.map((t, n) => /* @__PURE__ */ w(g, {
|
|
126
|
+
id: e(String(n)),
|
|
127
|
+
pitch: p.screen,
|
|
128
|
+
r: t,
|
|
129
|
+
tone: "fill-l4"
|
|
130
|
+
}, t)) }), H = (i) => {
|
|
131
|
+
let a = i.data ?? x, o = e(), c = h("response-time"), f = a.map((e) => e.q[5]), p = f.indexOf(Math.max(...f)), m = E + a.length * D, g = m + 26, _ = `Vote share by constituency at the 2024 general election, median: ${a.map((e) => `${e.channel} ${y(e.q[5])}`).join(", ")}`;
|
|
132
|
+
return /* @__PURE__ */ w(t, { children: (e) => {
|
|
133
|
+
let t = Math.max(...a.map((e) => r(e.channel, 12))), i = e - Math.max(...f.map((e) => r(y(e), 12))) - O, h = {
|
|
134
|
+
rowY: (e) => E + e * D + D / 2,
|
|
135
|
+
x: S().domain(j).range([t + O, i]),
|
|
136
|
+
x1: i
|
|
137
|
+
}, b = e < 480 ? F : P, x = Math.max(...a.flatMap((e) => I(e.q, h.x))), k = o.key === null ? null : a[o.key];
|
|
138
|
+
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T(u, {
|
|
139
|
+
height: g,
|
|
140
|
+
label: _,
|
|
141
|
+
leave: o.clear,
|
|
142
|
+
width: e,
|
|
143
|
+
children: [
|
|
144
|
+
/* @__PURE__ */ w(V, { tex: c }),
|
|
145
|
+
/* @__PURE__ */ w(v, {
|
|
146
|
+
items: B(c),
|
|
147
|
+
right: e,
|
|
148
|
+
y: 8
|
|
149
|
+
}),
|
|
150
|
+
b.map((e) => /* @__PURE__ */ T("g", { children: [/* @__PURE__ */ w(l, {
|
|
151
|
+
kind: "grid",
|
|
152
|
+
x: h.x(e),
|
|
153
|
+
y0: E,
|
|
154
|
+
y1: m
|
|
155
|
+
}), /* @__PURE__ */ w(d, {
|
|
156
|
+
anchor: "middle",
|
|
157
|
+
voice: "axis",
|
|
158
|
+
x: h.x(e),
|
|
159
|
+
y: m + 18,
|
|
160
|
+
children: y(e)
|
|
161
|
+
})] }, e)),
|
|
162
|
+
a.map((t, n) => /* @__PURE__ */ w(R, {
|
|
163
|
+
datum: t,
|
|
164
|
+
dense: {
|
|
165
|
+
max: x,
|
|
166
|
+
tex: c
|
|
167
|
+
},
|
|
168
|
+
dim: o.dim(n),
|
|
169
|
+
frame: h,
|
|
170
|
+
hero: n === p,
|
|
171
|
+
k: n,
|
|
172
|
+
onEnter: o.enter(n),
|
|
173
|
+
width: e
|
|
174
|
+
}, t.channel))
|
|
175
|
+
]
|
|
176
|
+
}), k === null || o.key === null ? null : /* @__PURE__ */ w(n, {
|
|
177
|
+
x: h.x(k.q[5]),
|
|
178
|
+
y: h.rowY(o.key) - A - 2,
|
|
179
|
+
children: /* @__PURE__ */ w(s, {
|
|
180
|
+
facts: [`median ${y(k.q[5])}`, `one in ten above ${y(k.q[9])}`],
|
|
181
|
+
lead: k.channel
|
|
182
|
+
})
|
|
183
|
+
})] });
|
|
184
|
+
} });
|
|
185
|
+
};
|
|
186
|
+
//#endregion
|
|
187
|
+
export { H as ResponseTime };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/charts/originals/revenue-by-plan.data.ts
|
|
3
|
+
var e = [
|
|
4
|
+
{
|
|
5
|
+
plan: "Lager",
|
|
6
|
+
prior: 3.37,
|
|
7
|
+
revenue: 4.77
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
plan: "Tea",
|
|
11
|
+
prior: 1.97,
|
|
12
|
+
revenue: 2.62
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
plan: "Loaf",
|
|
16
|
+
prior: 1.16,
|
|
17
|
+
revenue: 1.4
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
plan: "Milk",
|
|
21
|
+
prior: .462,
|
|
22
|
+
revenue: .651
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
//#endregion
|
|
26
|
+
export { e as planRevenue };
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { fmtSignedPct as e } from "../../lib/format.js";
|
|
3
|
+
import { useHover as t } from "../hooks.js";
|
|
4
|
+
import { Plot as n, Tooltip as r } from "../core.js";
|
|
5
|
+
import { clamp as i, sansWidth as a, stagger as o, sum as s } from "../util.js";
|
|
6
|
+
import { DimGroup as c, HitRect as l, TipText as u } from "../hover.js";
|
|
7
|
+
import { TICK as d } from "../marks.js";
|
|
8
|
+
import { HRule as f, Stem as p, VRule as m } from "../rules.js";
|
|
9
|
+
import { ChartSvg as h } from "../svg.js";
|
|
10
|
+
import { Label as g } from "../text.js";
|
|
11
|
+
import { TEXTURE_PITCH as _, paint as v, useTextureIds as y } from "../texture-ids.js";
|
|
12
|
+
import { CrossHatch as b, DotScreen as x, EngravedRect as S, Hatch as C } from "../texture.js";
|
|
13
|
+
import { planRevenue as w } from "./revenue-by-plan.data.js";
|
|
14
|
+
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
15
|
+
//#region src/charts/originals/revenue-by-plan.tsx
|
|
16
|
+
var O = 10, k = 24, A = k + d.xl + 6, j = 4, M = 34, N = 51, P = 67, F = 16, I = 112, L = 20, R = 22, z = [
|
|
17
|
+
"stroke-ink",
|
|
18
|
+
"stroke-l2",
|
|
19
|
+
"stroke-l3",
|
|
20
|
+
"stroke-l4"
|
|
21
|
+
], B = (e) => e === 0 ? "start" : e === 1 ? "end" : "middle", V = ({ tex: e }) => /* @__PURE__ */ D("defs", { children: [
|
|
22
|
+
/* @__PURE__ */ E(b, {
|
|
23
|
+
id: e("0"),
|
|
24
|
+
tone: "fill-hero"
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ E(C, {
|
|
27
|
+
angle: "rising",
|
|
28
|
+
id: e("1"),
|
|
29
|
+
tone: "fill-l2"
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ E(C, {
|
|
32
|
+
angle: "falling",
|
|
33
|
+
id: e("2"),
|
|
34
|
+
tone: "fill-l3"
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ E(x, {
|
|
37
|
+
id: e("3"),
|
|
38
|
+
r: 1,
|
|
39
|
+
tone: "fill-l3"
|
|
40
|
+
})
|
|
41
|
+
] }), H = (e) => `${Math.round(e * 100)}%`, U = (e) => `£${e.toFixed(2)}`, W = (e) => {
|
|
42
|
+
let t = s(e.map((e) => e.revenue)), n = 0;
|
|
43
|
+
return e.toSorted((e, t) => t.revenue - e.revenue).map((e, r) => {
|
|
44
|
+
let i = e.revenue / t, a = {
|
|
45
|
+
...e,
|
|
46
|
+
end: n + i,
|
|
47
|
+
growth: e.revenue / e.prior - 1,
|
|
48
|
+
k: r,
|
|
49
|
+
share: i,
|
|
50
|
+
start: n
|
|
51
|
+
};
|
|
52
|
+
return n += i, a;
|
|
53
|
+
});
|
|
54
|
+
}, G = (e) => {
|
|
55
|
+
let t = e - 1, n = i(Math.round(e / 16), 28, 40), r = A + n, a = i(Math.round(e * .82), 380, 470);
|
|
56
|
+
return {
|
|
57
|
+
barH: n,
|
|
58
|
+
base: r,
|
|
59
|
+
floor: a - R,
|
|
60
|
+
height: a,
|
|
61
|
+
x: (e) => e * t
|
|
62
|
+
};
|
|
63
|
+
}, K = (e, t) => Array.from({ length: 101 }, (e, t) => t).filter((n) => {
|
|
64
|
+
let r = (Math.min(n, 99) + .5) / 100;
|
|
65
|
+
return r >= e.start && (t || r < e.end);
|
|
66
|
+
}), q = ({ fill: t, gMax: n, lay: r, left: i, outline: s, seg: c, tone: l, width: u }) => {
|
|
67
|
+
let d = e(c.growth * 100), f = i + a(d, 13) > u, p = r.base + I, h = Math.max(4, Math.round((r.floor - p) * c.growth / n)), v = r.floor - h;
|
|
68
|
+
return /* @__PURE__ */ D(T, { children: [
|
|
69
|
+
/* @__PURE__ */ E(m, {
|
|
70
|
+
className: "grow-y from-top",
|
|
71
|
+
kind: "rule",
|
|
72
|
+
style: o(c.k + 4),
|
|
73
|
+
x: i,
|
|
74
|
+
y0: r.base + P + 10,
|
|
75
|
+
y1: v - L
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ E(g, {
|
|
78
|
+
anchor: f ? "end" : "start",
|
|
79
|
+
className: l,
|
|
80
|
+
order: c.k + 6,
|
|
81
|
+
voice: "value",
|
|
82
|
+
x: f ? u : i,
|
|
83
|
+
y: v - 7,
|
|
84
|
+
children: d
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ E(S, {
|
|
87
|
+
className: `grow-y ${s}`,
|
|
88
|
+
fill: t,
|
|
89
|
+
height: h + 1,
|
|
90
|
+
style: o(c.k + 4, "series"),
|
|
91
|
+
whole: c.k >= 3 ? {
|
|
92
|
+
clear: 1,
|
|
93
|
+
pitch: _.screen
|
|
94
|
+
} : void 0,
|
|
95
|
+
width: F,
|
|
96
|
+
x: i,
|
|
97
|
+
y: v
|
|
98
|
+
})
|
|
99
|
+
] });
|
|
100
|
+
}, J = ({ dim: e, fill: t, gMax: n, lay: r, onEnter: i, seg: s, ticks: u, width: f }) => {
|
|
101
|
+
let { base: m, x: h } = r, v = s.k === 0, y = Math.round(h(s.start)) + (v ? 0 : 2), b = v ? "" : "fill-muted", x = v ? "stroke-ink" : "stroke-l5", C = y + Math.max(a(s.plan, 13), a(H(s.share), 13), a(U(s.revenue), 13)) > f, w = C ? f : y, T = C ? "end" : "start";
|
|
102
|
+
return /* @__PURE__ */ D(c, {
|
|
103
|
+
dim: e,
|
|
104
|
+
onPointerEnter: i,
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ E(l, {
|
|
107
|
+
height: r.height,
|
|
108
|
+
width: Math.max(1, h(s.end) - h(s.start)),
|
|
109
|
+
x: h(s.start),
|
|
110
|
+
y: 0
|
|
111
|
+
}),
|
|
112
|
+
u.map((e) => /* @__PURE__ */ E(p, {
|
|
113
|
+
className: `grow-y from-top ${z[Math.min(s.k, 3)]}`,
|
|
114
|
+
style: o(e, "dense"),
|
|
115
|
+
x: h(e / 100),
|
|
116
|
+
y0: k,
|
|
117
|
+
y1: k + (e % 10 == 0 ? d.xl : d.lg)
|
|
118
|
+
}, e)),
|
|
119
|
+
/* @__PURE__ */ E(S, {
|
|
120
|
+
className: `grow-x ${x}`,
|
|
121
|
+
fill: t,
|
|
122
|
+
height: r.barH,
|
|
123
|
+
style: o(s.k, "series"),
|
|
124
|
+
whole: s.k >= 3 ? {
|
|
125
|
+
clear: 1,
|
|
126
|
+
pitch: _.screen
|
|
127
|
+
} : void 0,
|
|
128
|
+
width: Math.max(2, Math.round(h(s.end)) - y),
|
|
129
|
+
x: y,
|
|
130
|
+
y: A
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ E(p, {
|
|
133
|
+
className: `grow-y from-top ${v ? "stroke-ink" : "stroke-l4"}`,
|
|
134
|
+
style: o(s.k + 2),
|
|
135
|
+
x: y,
|
|
136
|
+
y0: m + j,
|
|
137
|
+
y1: m + j + d.xl
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ D("g", {
|
|
140
|
+
className: "fade",
|
|
141
|
+
style: o(s.k + 4),
|
|
142
|
+
children: [
|
|
143
|
+
/* @__PURE__ */ E(g, {
|
|
144
|
+
anchor: T,
|
|
145
|
+
muted: !v,
|
|
146
|
+
voice: "label",
|
|
147
|
+
x: w,
|
|
148
|
+
y: m + M,
|
|
149
|
+
children: s.plan
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ E(g, {
|
|
152
|
+
anchor: T,
|
|
153
|
+
muted: !v,
|
|
154
|
+
voice: "value",
|
|
155
|
+
x: w,
|
|
156
|
+
y: m + N,
|
|
157
|
+
children: H(s.share)
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ E(g, {
|
|
160
|
+
anchor: T,
|
|
161
|
+
muted: !0,
|
|
162
|
+
voice: "value",
|
|
163
|
+
x: w,
|
|
164
|
+
y: m + P,
|
|
165
|
+
children: U(s.revenue)
|
|
166
|
+
})
|
|
167
|
+
]
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ E(q, {
|
|
170
|
+
fill: t,
|
|
171
|
+
gMax: n,
|
|
172
|
+
lay: r,
|
|
173
|
+
left: y,
|
|
174
|
+
outline: x,
|
|
175
|
+
seg: s,
|
|
176
|
+
tone: b,
|
|
177
|
+
width: f
|
|
178
|
+
})
|
|
179
|
+
]
|
|
180
|
+
});
|
|
181
|
+
}, Y = ({ x: e, x1: t }) => /* @__PURE__ */ D(T, { children: [[
|
|
182
|
+
0,
|
|
183
|
+
.5,
|
|
184
|
+
1
|
|
185
|
+
].map((t) => /* @__PURE__ */ E(g, {
|
|
186
|
+
anchor: B(t),
|
|
187
|
+
voice: "axis",
|
|
188
|
+
x: e(t),
|
|
189
|
+
y: O,
|
|
190
|
+
children: H(t)
|
|
191
|
+
}, t)), /* @__PURE__ */ E(f, {
|
|
192
|
+
x0: 0,
|
|
193
|
+
x1: t,
|
|
194
|
+
y: 23
|
|
195
|
+
})] }), X = (i) => {
|
|
196
|
+
let a = W(i.data ?? w), o = t(), s = y("revenue-by-plan"), c = Math.max(...a.map((e) => e.growth)), l = `Average shop prices in 2024 as shares of the four, with the rise on 2014: ${a.map((t) => `${t.plan} ${H(t.share)}, ${e(t.growth * 100)} on 2014`).join("; ")}`;
|
|
197
|
+
return /* @__PURE__ */ E(n, { children: (t) => {
|
|
198
|
+
let n = G(t), i = o.key === null ? null : a[o.key];
|
|
199
|
+
return /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ D(h, {
|
|
200
|
+
height: n.height,
|
|
201
|
+
label: l,
|
|
202
|
+
leave: o.clear,
|
|
203
|
+
width: t,
|
|
204
|
+
children: [
|
|
205
|
+
/* @__PURE__ */ E(V, { tex: s }),
|
|
206
|
+
/* @__PURE__ */ E(Y, {
|
|
207
|
+
x: n.x,
|
|
208
|
+
x1: t - 1
|
|
209
|
+
}),
|
|
210
|
+
/* @__PURE__ */ E(f, {
|
|
211
|
+
x0: 0,
|
|
212
|
+
x1: t - 1,
|
|
213
|
+
y: n.floor
|
|
214
|
+
}),
|
|
215
|
+
/* @__PURE__ */ E(g, {
|
|
216
|
+
anchor: "end",
|
|
217
|
+
voice: "axis",
|
|
218
|
+
x: t,
|
|
219
|
+
y: n.floor + 16,
|
|
220
|
+
children: "Rise on 2014"
|
|
221
|
+
}),
|
|
222
|
+
a.map((e) => /* @__PURE__ */ E(J, {
|
|
223
|
+
dim: o.dim(e.k),
|
|
224
|
+
fill: v(s(String(Math.min(e.k, 3)))),
|
|
225
|
+
gMax: c,
|
|
226
|
+
lay: n,
|
|
227
|
+
onEnter: o.enter(e.k),
|
|
228
|
+
seg: e,
|
|
229
|
+
ticks: K(e, e.k === a.length - 1),
|
|
230
|
+
width: t
|
|
231
|
+
}, e.plan))
|
|
232
|
+
]
|
|
233
|
+
}), i === null ? null : /* @__PURE__ */ E(r, {
|
|
234
|
+
x: n.x((i.start + i.end) / 2),
|
|
235
|
+
y: 22,
|
|
236
|
+
children: /* @__PURE__ */ E(u, {
|
|
237
|
+
facts: [
|
|
238
|
+
U(i.revenue),
|
|
239
|
+
`${(i.share * 100).toFixed(1)}%`,
|
|
240
|
+
`${e(i.growth * 100)} on 2014`
|
|
241
|
+
],
|
|
242
|
+
lead: i.plan
|
|
243
|
+
})
|
|
244
|
+
})] });
|
|
245
|
+
} });
|
|
246
|
+
};
|
|
247
|
+
//#endregion
|
|
248
|
+
export { X as RevenueByPlan };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMotionPreference as e, useReveal as t } from "./hooks.js";
|
|
3
|
+
import { useEffect as n, useLayoutEffect as r, useRef as i, useState as a } from "react";
|
|
4
|
+
//#region src/charts/playback.ts
|
|
5
|
+
var o = 64, s = (e, t = .1) => {
|
|
6
|
+
let [r, i] = a(!1);
|
|
7
|
+
return n(() => {
|
|
8
|
+
let n = new IntersectionObserver(([e]) => {
|
|
9
|
+
i(e.isIntersecting);
|
|
10
|
+
}, { threshold: t });
|
|
11
|
+
return e.current !== null && n.observe(e.current), () => {
|
|
12
|
+
n.disconnect();
|
|
13
|
+
};
|
|
14
|
+
}, [e, t]), r;
|
|
15
|
+
}, c = (e) => {
|
|
16
|
+
let n = t(e), r = s(e);
|
|
17
|
+
return n && r;
|
|
18
|
+
}, l = (e, t) => {
|
|
19
|
+
let a = i(t);
|
|
20
|
+
r(() => {
|
|
21
|
+
a.current = t;
|
|
22
|
+
}), n(() => {
|
|
23
|
+
let t = 0, n = performance.now(), r = (e) => {
|
|
24
|
+
let i = Math.min(o, e - n);
|
|
25
|
+
n = e, a.current(i), t = requestAnimationFrame(r);
|
|
26
|
+
};
|
|
27
|
+
return e && (t = requestAnimationFrame(r)), () => {
|
|
28
|
+
cancelAnimationFrame(t);
|
|
29
|
+
};
|
|
30
|
+
}, [e]);
|
|
31
|
+
}, u = (e, t, a) => {
|
|
32
|
+
let o = i(a);
|
|
33
|
+
r(() => {
|
|
34
|
+
o.current = a;
|
|
35
|
+
}), n(() => {
|
|
36
|
+
let n = 0;
|
|
37
|
+
return e && (n = window.setInterval(() => {
|
|
38
|
+
o.current();
|
|
39
|
+
}, t)), () => {
|
|
40
|
+
window.clearInterval(n);
|
|
41
|
+
};
|
|
42
|
+
}, [e, t]);
|
|
43
|
+
}, d = (e, t) => t ? e.reduced === "end" ? e.end : e.start ?? 0 : 0, f = (t) => {
|
|
44
|
+
let n = c(t.box), r = e(), i = r ?? !0, [o, s] = a(r !== null), [f, p] = a(() => d(t, i)), [m, h] = a(() => !i);
|
|
45
|
+
!o && r !== null && (s(!0), p(d(t, i)), h(!i));
|
|
46
|
+
let g = f >= t.end, _ = m && n && !g, v = t.step?.unit ?? 1;
|
|
47
|
+
return l(_ && !i, (e) => {
|
|
48
|
+
p((n) => Math.min(t.end, n + e / t.rate));
|
|
49
|
+
}), u(_ && i, t.step?.every ?? 0, () => {
|
|
50
|
+
p((e) => Math.min(t.end, (Math.floor(e / v) + 1) * v));
|
|
51
|
+
}), {
|
|
52
|
+
done: g,
|
|
53
|
+
handleReplay: () => {
|
|
54
|
+
p(0), h(!0);
|
|
55
|
+
},
|
|
56
|
+
handleSeek: (e) => {
|
|
57
|
+
h(!1), p(e);
|
|
58
|
+
},
|
|
59
|
+
handleToggle: () => {
|
|
60
|
+
g ? (p(0), h(!0)) : h((e) => !e);
|
|
61
|
+
},
|
|
62
|
+
playing: m && !g,
|
|
63
|
+
reduced: i,
|
|
64
|
+
t: f
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { l as useFrame, s as useInView, c as useLive, f as usePlayhead };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { noteLines as e, stagger as t } from "./util.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/charts/plot-note.tsx
|
|
5
|
+
var r = (r) => {
|
|
6
|
+
let i = e(r.text, r.width, r.metrics);
|
|
7
|
+
return i.length === 0 ? null : /* @__PURE__ */ n("g", {
|
|
8
|
+
className: "fade",
|
|
9
|
+
style: t(r.order ?? 6),
|
|
10
|
+
children: i.map((e, t) => /* @__PURE__ */ n("text", {
|
|
11
|
+
className: "t-axis",
|
|
12
|
+
textAnchor: r.anchor ?? "middle",
|
|
13
|
+
x: r.x,
|
|
14
|
+
y: r.y - (i.length - 1 - t) * 12,
|
|
15
|
+
children: e
|
|
16
|
+
}, e))
|
|
17
|
+
});
|
|
18
|
+
}, i = (e) => /* @__PURE__ */ n(r, {
|
|
19
|
+
metrics: e.metrics,
|
|
20
|
+
order: e.order,
|
|
21
|
+
text: e.text,
|
|
22
|
+
width: e.width - 2 * (e.gutter ?? 8),
|
|
23
|
+
x: e.width / 2,
|
|
24
|
+
y: e.height - 6
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
27
|
+
export { i as FootNote, r as PlotNote };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/charts/roles.ts
|
|
3
|
+
var e = "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", t = "t-value", n = "grid-line", r = "grid-line", i = "hairline", a = "stroke-l3 dash-rule shape-crisp", o = "stroke-faint shape-crisp";
|
|
4
|
+
//#endregion
|
|
5
|
+
export { o as CURSOR, n as GRID_H, r as GRID_V, e as PANEL, a as RULE_TARGET, i as RULE_ZERO, t as VALUE };
|