Skip to content

docs(examples): add the financial-report one-pager flagship#204

Merged
DemchaAV merged 4 commits into
developfrom
feat/v1.8-financial-report
Jun 17, 2026
Merged

docs(examples): add the financial-report one-pager flagship#204
DemchaAV merged 4 commits into
developfrom
feat/v1.8-financial-report

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

The v1.8 illustrative surface — native vector charts, donut gauges, inline
sparklines, path-clipped images, block-level alignment — had no single flagship
exercising them together on a real one-page brief. This branch added that
example but had drifted 63 commits behind develop and shipped without a layout
snapshot test or a committed preview, unlike the other flagships.

What changed

  • FinancialReportExample — an A4 one-pager "Monthly Financial Report":
    a path-clipped photo masthead, three donut profit-margin gauges with centre
    KPIs, a Cash-position block (KPI tile, cash bar, stacked OPEX, revenue donut)
    and a Forecast block (revenue bars, horizontal grouped cost breakdown), plus
    masthead sparklines. All vector, no raster; recoloured through the
    ChartStyle cascade.
  • compose(DocumentSession) extracted from generate() so the layout is
    testable without writing a file — the EngineDeck flagship pattern.
  • FinancialReportLayoutSnapshotTest locks the resolved geometry against a
    committed baseline.
  • Committed preview assets/readme/examples/financial-report.pdf and the
    gallery [PDF] link.
  • The resource-loader overload is renamed loadMastheadPhoto() so it no longer
    collides by name with the node-building mastheadPhoto(photo).
  • Brought up to date with develop (one trivial GenerateAllExamples merge —
    keeps both EngineDeck and FinancialReport registered).

Verification

  • ./mvnw -f examples/pom.xml test → BUILD SUCCESS (snapshot test + generation
    smoke green).
  • GenerateAllExamples renders every example including the new one; the report
    is exactly one page.
  • Survives the recent develop changes: the example uses only
    DocumentPaint.solid(...) (no translucent gradient stops), and its one grouped
    bar chart uses positive data, so the zero-baseline change is byte-identical for
    it.

Lane: examples (canonical surface only). No library / public-API change.

DemchaAV added 4 commits June 14, 2026 20:02
Why: v1.8 shipped native vector charts, inline sparklines, free-form
path clipping, and block-level alignment, but no flagship example wired
them into a single real-world infographic.

What: FinancialReportExample renders a one-page "Business Monthly
Financial Report" on the canonical DSL — three donut gauges with centre
KPIs, a monthly cash bar chart, a stacked OPEX chart, a revenue-breakdown
donut, forecast revenue bars, and a horizontal forecast-vs-actual cost
chart, plus masthead sparklines and a parallelogram-clipped photo. Every
chart recolours through the ChartStyle cascade to a terracotta/teal/cream
palette. Registered in GenerateAllExamples and listed in the examples
README. Combo bar+line charts are not a native chart kind, so OPEX is a
stacked bar and the trend reads as a masthead sparkline.

Tests: ./mvnw test -Dtest=CanonicalSurfaceGuardTest -pl . (8 green) keeps
the example on the canonical surface (no engine imports, no legacy API);
./mvnw -f examples/pom.xml exec:java ...FinancialReportExample renders a
single A4 page.
…eport

# Conflicts:
#	examples/src/main/java/com/demcha/examples/GenerateAllExamples.java
Extract FinancialReportExample.compose(DocumentSession) from generate() so the
new FinancialReportLayoutSnapshotTest lays out the exact one-pager into its own
session and diffs the resolved geometry against a committed baseline — the
flagship pattern EngineDeck already follows. Commit the rendered preview at
assets/readme/examples/financial-report.pdf and link it from the examples
gallery row. Rename the resource-loader overload to loadMastheadPhoto() so it
no longer collides by name with the node-building mastheadPhoto(photo).
…uffix

Rename the discontinued "iPod" revenue-breakdown category to "Wearables" and
switch cashAtEndCard's axis suffix from "K" to "k" so every axis on the sheet
reads the same casing. Re-bless the layout snapshot baseline (the wider legend
label shifts geometry) and refresh the committed preview.
@DemchaAV DemchaAV merged commit 328eaae into develop Jun 17, 2026
11 checks passed
@DemchaAV DemchaAV deleted the feat/v1.8-financial-report branch June 17, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant