Skip to content

feat(makie): implement waterfall-basic - #9986

Merged
MarkusNeusinger merged 6 commits into
mainfrom
implementation/waterfall-basic/makie
Aug 4, 2026
Merged

feat(makie): implement waterfall-basic#9986
MarkusNeusinger merged 6 commits into
mainfrom
implementation/waterfall-basic/makie

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Implementation: waterfall-basic - julia/makie

Implements the julia/makie version of waterfall-basic.

File: plots/waterfall-basic/implementations/julia/makie.jl

Parent Issue: #777


🤖 impl-generate workflow

@claude

claude Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

AI Review - Attempt 1/3

Image Description

Light render (plot-light.png): Warm off-white (#FAF8F1) background. Bold dark title "Quarterly Profit Bridge · waterfall-basic · julia · makie · anyplot.ai" centered at top, fully visible with no clipping. Seven floating bars: near-black start ("Starting Balance") and end ("Net Profit") Total bars, two Imprint-green (#009E73) increase bars, three matte-red (#AE3030) decrease bars. Dotted connector lines link each bar's cumulative level to the next bar's base. Running-total dollar labels sit above bars for increases/totals and below for decreases. A compact horizontal legend (Increase/Decrease/Total) sits top-left inside the plot, transparent background. All text is clearly readable against the light background.

Dark render (plot-dark.png): Warm near-black (#1A1A17) background. Same title, now in light/cream text, fully visible. Y-axis label and tick labels are light-colored and legible. The green and red data bars are pixel-identical to the light render — only chrome flipped. The Total bars flip from near-black to near-white/cream, matching the style guide's theme-adaptive neutral semantic anchor (documented use case: "totals / baseline / outline / reference line") — this is intended behavior, not a compliance violation. No dark-on-dark or light-on-light failures observed.

Both renders confirmed readable; no AR-09 edge clipping found in either.

Score: 88/100

Category Score Max
Visual Quality 28 30
Design Excellence 13 20
Spec Compliance 15 15
Data Quality 15 15
Code Quality 10 10
Library Mastery 7 10
Total 88 100

Visual Quality (28/30)

  • VQ-01: Text Legibility (7/8) - All sizes explicitly set, well-proportioned; value labels slightly close in size to tick labels
  • VQ-02: No Overlap (6/6) - No collisions anywhere
  • VQ-03: Element Visibility (5/6) - Bar width and connector lines visible, could be marginally more prominent
  • VQ-04: Color Accessibility (2/2) - Increase/decrease also cued by bar direction, not color alone
  • VQ-05: Layout & Canvas (4/4) - Good canvas utilization, balanced margins, legend near plot
  • VQ-06: Axis Labels & Title (2/2) - Y-axis has units ("Amount ($M)")
  • VQ-07: Palette Compliance (2/2) - Correct Imprint colors, correct neutral semantic anchor use for totals, correct theme-adaptive chrome in both renders

Design Excellence (13/20)

  • DE-01: Aesthetic Sophistication (5/8) - Thoughtful semantic color use and connector-line technique clearly above defaults, but short of full publication polish
  • DE-02: Visual Refinement (4/6) - Spines removed, subtle single-axis grid, transparent frameless legend
  • DE-03: Data Storytelling (4/6) - Color + connector lines guide the eye through the bridge; no explicit callout on the largest swing or final result

Spec Compliance (15/15)

  • SC-01: Plot Type (5/5) - Correct floating-bar waterfall
  • SC-02: Required Features (4/4) - Distinct pos/neg colors, connecting lines, distinct total bars, running-total labels all present
  • SC-03: Data Mapping (3/3) - Categories on X, cumulative amount on Y
  • SC-04: Title & Legend (3/3) - Title format correct with descriptive prefix; legend matches data

Data Quality (15/15)

  • DQ-01: Feature Coverage (6/6) - Increases, decreases, and totals all present
  • DQ-02: Realistic Context (5/5) - Neutral, plausible quarterly profit bridge
  • DQ-03: Appropriate Scale (4/4) - Dollar magnitudes and cumulative math internally consistent

Code Quality (10/10)

  • CQ-01: KISS Structure (3/3)
  • CQ-02: Reproducibility (2/2) - Fully deterministic data
  • CQ-03: Clean Imports (2/2) - CairoMakie, Colors, Printf all used
  • CQ-04: Code Elegance (2/2)
  • CQ-05: Output & API (1/1) - Correct save("plot-$(THEME).png"; px_per_unit=2)

Library Mastery (7/10)

  • LM-01: Idiomatic Usage (4/5) - barplot! with fillto for floating bars, idiomatic Axis/Legend usage
  • LM-02: Distinctive Features (3/5) - Uses some Makie-specific touches (fillto, PolyElement legend, RGBAf grid alpha) but nothing hard to replicate elsewhere

Score Caps Applied

  • None

Strengths

  • Correct waterfall cumulative math verified by hand (12.40 → 20.90 → 25.20 → 19.80 → 16.70 → 14.85)
  • Correct use of the Imprint style guide's theme-adaptive neutral semantic anchor for Total bars — exactly the documented use case
  • Dotted connecting lines satisfy the spec's "show connecting lines to emphasize cumulative flow" requirement
  • Running-total labels intelligently placed above/below bars to avoid overlap
  • Clean, unobtrusive legend; realistic neutral business data; idiomatic Makie code

Weaknesses

  • Design Excellence is solid but not yet publication-tier — no visual emphasis on the largest swing (Operating Costs) or the final net profit; a subtle size/emphasis or short annotation would sharpen the story (DE-03)
  • Value labels (fontsize=13) are close in size to tick labels (fontsize=12) with little hierarchy — bumping label fontsize up slightly would strengthen hierarchy and mobile legibility (VQ-01)
  • Overall aesthetic is clean but fairly conventional for a waterfall — a touch more typographic or color-depth polish would move this from "strong" to "exceptional" (DE-01)
  • Library Mastery usage is correct but generic — consider a Makie-distinctive touch like rich() text formatting or a Label subtitle in the GridLayout (LM-02)

Issues Found

  1. DE-01 MEDIUM: Above-default but not publication-level polish
    • Fix: Add a touch more typographic hierarchy (e.g. a light subtitle) or slightly bolder connector-line styling
  2. DE-03 MEDIUM: No explicit emphasis on the story's focal point
    • Fix: Highlight the largest single swing (Operating Costs decrease) or the final net profit with subtle emphasis (bolder label, slight size increase, or short annotation)
  3. LM-02 LOW: Generic-ish feature usage
    • Fix: Use a Makie-distinctive feature such as rich() text formatting on value labels or a Label GridLayout subtitle

AI Feedback for Next Attempt

Solid, spec-compliant implementation with correct math, correct palette/theme handling, and a well-executed semantic choice for the Total bars. To push past 90: add a bit more visual storytelling (emphasize the largest swing or the final result), slightly increase value-label hierarchy relative to tick labels, and lean into one more Makie-distinctive touch (e.g. rich() text or a GridLayout subtitle) for Library Mastery.

Verdict: REJECTED

@github-actions github-actions Bot added quality:88 Quality score: 88/100 ai-rejected Quality not OK, triggers update labels Aug 4, 2026
@github-actions github-actions Bot added ai-attempt-1 First repair attempt and removed ai-rejected Quality not OK, triggers update labels Aug 4, 2026
Attempt 1/4 - fixes based on AI review
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

🔧 Repair Attempt 1/4

Applied fixes based on AI review feedback.

Status: Repair completed, re-triggering review...


🤖 impl-repair

@claude

claude Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

AI Review - Attempt 2/3

Image Description

Light render (plot-light.png): A warm off-white (#FAF8F1) waterfall chart titled "Quarterly Profit Bridge · waterfall-basic · julia · makie · anyplot.ai" in dark ink. Seven floating bars trace a quarterly profit bridge: "Starting Balance" ($12.40M, black/ink total bar) → "Product Sales" (+$8.5M, green, reaching $20.90M) → "Service Revenue" (+$4.3M, green, reaching $25.20M) → "Operating Costs" (-$5.4M, red, dropping to $19.80M, with a bold larger label calling it out as the biggest single decrease) → "Marketing Spend" (-$3.1M, red, to $16.70M) → "Taxes" (-$1.85M, red, to $14.85M) → "Net Profit" ($14.85M, black total bar). Dotted horizontal connector lines link each bar's cumulative level to the next bar's start. A rich-text subtitle under the title reads "Net profit reaches $14.85M despite a $5.40M Operating Costs pullback — the bridge's largest single decrease" with the two dollar figures colored green/red respectively. A horizontal legend (Increase/Decrease/Total swatches) sits top-left. Y-axis is labeled "Amount ($M)" with gridlines at 0/10/20. All text — title, subtitle, running-total labels, axis ticks, category labels — is dark ink on the light background and clearly readable. No dark-on-light or invisible elements.

Dark render (plot-dark.png): Identical structure and layout on the warm near-black (#1A1A17) background. The green (#009E73) and red (#AE3030) data bars are pixel-identical to the light render — confirmed by comparing bar colors, positions, and values. Only chrome flips: the total bars (Starting Balance, Net Profit) switch from black to warm off-white/cream, title/subtitle/labels/tick text switches to light ink, and the legend "Total" swatch flips accordingly. All text remains clearly legible against the dark background — no dark-on-dark failures observed; title, running-total labels, axis ticks, and the rich-text subtitle all render in light-enough tones against the near-black surface.

Both renders pass the theme-readability check: correct background hues in both, no clipped or invisible text, and the green/red data colors are identical between themes as required — only chrome (background, ink, total-bar color) adapts.

Score: 93/100

Category Score Max
Visual Quality 29 30
Design Excellence 15 20
Spec Compliance 15 15
Data Quality 15 15
Code Quality 10 10
Library Mastery 9 10
Total 93 100

Visual Quality (29/30)

  • VQ-01: Text Legibility (7/8) — All text explicitly sized and readable in both themes; running-total labels correctly flip color per theme.
  • VQ-02: No Overlap (6/6) — No collisions between labels, connector lines, subtitle, or legend.
  • VQ-03: Element Visibility (6/6) — 7 bars at width=0.62 are prominent and well-separated; markers/lines appropriately sized for this sparse (7-step) dataset.
  • VQ-04: Color Accessibility (2/2) — Green/red is the standard waterfall convention, reinforced by a legend and by the bold, disambiguating value labels — not the sole signal.
  • VQ-05: Layout & Canvas (4/4) — Confirmed 3200×1800 exact canvas; title ~40% width, well within bounds; nothing overflows or crowds the edges.
  • VQ-06: Axis Labels & Title (2/2) — Y-axis carries units ("Amount ($M)"); title follows the mandated format with a sensible descriptive prefix.
  • VQ-07: Palette Compliance (2/2) — First series is Imprint #009E73; decrease uses the documented semantic-exception anchor #AE3030 (position 5); backgrounds match #FAF8F1/#1A1A17 exactly; data colors identical across themes.

Design Excellence (15/20)

  • DE-01: Aesthetic Sophistication (6/8) - Custom palette use, theme-adaptive total-bar color, and a mixed-weight/color rich() subtitle show real design intent beyond template defaults.
  • DE-02: Visual Refinement (4/6) - Top/right spines removed, grid subtle (15% alpha, y-only), generous whitespace; fairly close to the library-skeleton defaults otherwise.
  • DE-03: Data Storytelling (5/6) - Dotted connector lines guide the eye through the bridge, and the largest single decrease gets both a bolder/larger running-total label and a dedicated subtitle callout — a clear, well-chosen focal point.

Spec Compliance (15/15)

  • SC-01: Plot Type (5/5) - Correct waterfall/bridge chart with floating bars anchored to cumulative totals.
  • SC-02: Required Features (4/4) - Positive/negative color-coding, connecting lines, distinct start/end total bars, and running-total labels are all present.
  • SC-03: Data Mapping (3/3) - X = category steps, Y = cumulative amount; all 7 steps shown.
  • SC-04: Title & Legend (3/3) - Title matches {Descriptive Title} · waterfall-basic · julia · makie · anyplot.ai; legend labels (Increase/Decrease/Total) match the encoding.

Data Quality (15/15)

  • DQ-01: Feature Coverage (6/6) - Increases, decreases, and both total anchors are all represented; connecting lines and running-total labels present.
  • DQ-02: Realistic Context (5/5) - Plausible, neutral quarterly financial profit-bridge scenario (revenue build-up through cost/tax deductions to net profit).
  • DQ-03: Appropriate Scale (4/4) - Values in the $1M–$25M range are sensible for a quarterly company financial breakdown.

Code Quality (10/10)

  • CQ-01: KISS Structure (3/3) - Flat top-level script, no functions/classes.
  • CQ-02: Reproducibility (2/2) - Fully deterministic hardcoded data, no unseeded randomness.
  • CQ-03: Clean Imports (2/2) - CairoMakie, Colors, Printf all used.
  • CQ-04: Code Elegance (2/2) - Appropriate complexity for the chart type; no fake UI.
  • CQ-05: Output & API (1/1) - Saves plot-$(THEME).png via save(...; px_per_unit = 2), current CairoMakie API.

Library Mastery (9/10)

  • LM-01: Idiomatic Usage (5/5) - Idiomatic Axis/barplot!/lines!/text!/Legend composition following Makie's grammar.
  • LM-02: Distinctive Features (4/5) - Uses Makie's rich() to mix bold weight and color within a single text object for the subtitle — a genuinely Makie-specific technique, not just a generic port from another library.

Score Caps Applied

  • None

Strengths

  • Correct, fully-verified cumulative math (running totals match all displayed labels exactly).
  • Dotted connector lines and the bold/larger label on the largest single decrease create real visual hierarchy and a clear narrative focal point.
  • rich() mixed-format subtitle is a nice Makie-idiomatic storytelling touch that ties the headline numbers back into the chart.
  • Theme-adaptive total-bar color (INK) keeps start/end bars distinct from data bars in both themes without introducing an off-palette color.
  • Canvas lands exactly on the 3200×1800 target with no clipping in either render.

Weaknesses

  • Total bars (Starting Balance, Net Profit) are colored via the ink/chrome token rather than a dedicated categorical tone (e.g. a muted blue/gray from the Imprint palette) — visually distinct and legible, but leans on a chrome color for a data-encoding role; consider a palette-derived neutral if this is revisited.
  • Design Excellence is solid but still close to the documented style-guide skeleton; a bit more customization (e.g. a distinct total-bar hue, or subtle bar corner rounding) would push DE-01 further.

Issues Found

No blocking issues found.

AI Feedback for Next Attempt

No repair needed — implementation approved. If iterated further, consider giving the start/end total bars a dedicated Imprint-palette neutral tone instead of the ink/chrome token, for a touch more Design Excellence polish.

Verdict: APPROVED

@github-actions github-actions Bot added quality:93 Quality score 93/100 ai-approved Quality OK, ready for merge and removed quality:88 Quality score: 88/100 labels Aug 4, 2026
@MarkusNeusinger
MarkusNeusinger merged commit 3bcbc8d into main Aug 4, 2026
3 checks passed
@MarkusNeusinger
MarkusNeusinger deleted the implementation/waterfall-basic/makie branch August 4, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-approved Quality OK, ready for merge ai-attempt-1 First repair attempt quality:93 Quality score 93/100

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant