diff --git a/library/components/charts/BoundedSet.vue b/library/components/charts/BoundedSet.vue deleted file mode 100644 index cbcf2e8e4..000000000 --- a/library/components/charts/BoundedSet.vue +++ /dev/null @@ -1,69 +0,0 @@ - - - - - diff --git a/library/components/charts/CenteredSetTarget.vue b/library/components/charts/CenteredSetTarget.vue deleted file mode 100644 index 3efd3004c..000000000 --- a/library/components/charts/CenteredSetTarget.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - - - diff --git a/library/components/charts/VisionFunnel.vue b/library/components/charts/VisionFunnel.vue deleted file mode 100644 index 34ad5a807..000000000 --- a/library/components/charts/VisionFunnel.vue +++ /dev/null @@ -1,145 +0,0 @@ - - - - - diff --git a/library/components/charts/packetCharts.js b/library/components/charts/packetCharts.js index 184c2eca2..54abb0296 100644 --- a/library/components/charts/packetCharts.js +++ b/library/components/charts/packetCharts.js @@ -196,27 +196,6 @@ export function fractionFromPercent(percent) { return (Number(percent) || 0) / 100 } -/** - * ★ WHICH cells are shaded, deterministically — LIFTED VERBATIM from packet-render.js's lifeGrid so - * there is ONE implementation rather than a component and a renderer that drift. - * - * The algorithm and the reasoning are not mine; both are carried across intact. Two properties the - * packet depends on, and the second is the one that cost a shipped page: - * - * DETERMINISTIC, never Math.random(): the same packet must print identically every time, or two - * copies of one zone disagree and neither is reproducible. FNV-1a over the seed feeds a mulberry32 - * PRNG, so the pattern is stable per zone and different BETWEEN zones, which also stops every packet - * in a print run carrying the same constellation. - * - * SCATTERED, NOT STACKED. The original comment reasoned that a contiguous run would read better; - * the render showed the opposite — 32 contiguous cells fill most of row 1 of 52, so the page printed - * as one solid bar across the header, the ordinary chart the life grid exists to avoid. The message - * is rarity: 32 boxes lost among 5,200, and the eye has to hunt for them. Scattering IS the point. - * - * ⚠ AND NO GATE COULD SEE IT — the existing check asserts the shaded COUNT is between 0 and 5,200, - * which is equally true of a scatter and of a bar. A count cannot distinguish a distribution. That - * is why scatterSpread() below exists and why check-packet-charts asserts the shape, not the total. - */ /** * The FIRST n cells, in reading order — the counterpart to scatterCells. * @@ -238,6 +217,27 @@ export function topCells(total, n) { return picked } +/** + * ★ WHICH cells are shaded, deterministically — LIFTED VERBATIM from packet-render.js's lifeGrid so + * there is ONE implementation rather than a component and a renderer that drift. + * + * The algorithm and the reasoning are not mine; both are carried across intact. Two properties the + * packet depends on, and the second is the one that cost a shipped page: + * + * DETERMINISTIC, never Math.random(): the same packet must print identically every time, or two + * copies of one zone disagree and neither is reproducible. FNV-1a over the seed feeds a mulberry32 + * PRNG, so the pattern is stable per zone and different BETWEEN zones, which also stops every packet + * in a print run carrying the same constellation. + * + * SCATTERED, NOT STACKED. The original comment reasoned that a contiguous run would read better; + * the render showed the opposite — 32 contiguous cells fill most of row 1 of 52, so the page printed + * as one solid bar across the header, the ordinary chart the life grid exists to avoid. The message + * is rarity: 32 boxes lost among 5,200, and the eye has to hunt for them. Scattering IS the point. + * + * ⚠ AND NO GATE COULD SEE IT — the existing check asserts the shaded COUNT is between 0 and 5,200, + * which is equally true of a scatter and of a bar. A count cannot distinguish a distribution. That + * is why scatterSpread() below exists and why check-packet-charts asserts the shape, not the total. + */ export function scatterCells(total, n, seed = '') { const TOTAL = Math.max(0, Number(total) || 0) const count = Math.max(0, Math.min(TOTAL, Math.round(Number(n) || 0)))