Owned work, no contributor labels: Vega builds it under #21367 for the Engine 14 lock (Sun 22 Nov, 18:00 CET).
Context
The am-charts card in Charts, Canvas & Maps (apps/portal/resources/data/examples.json:928) has no cover ("image": null). Charts part 2 deferred it because its labels drew only after #21400 (PR #21401), which closed on 19 Nov (#21406, Out of Scope). The epic's cover rule (#21367): a card publishes only with a cover taken after its content is drawn, and a canvas scene needs a drawn signal on the DOM. #21406 left other renderers' signals for "when an example or test needs it". This card needs one now.
The Problem
Nothing tells a capture that the pie is drawn. Neo.main.addon.AmCharts#create() (src/main/addon/AmCharts.mjs:152) returns as soon as am4core.createFromConfig returns; amCharts validates the data and draws in later frames. The wrapper's onChartMounted() (src/component/wrapper/AmChart.mjs:240) runs on that early answer. A recipe that waits for the SVG or a fixed delay publishes whichever frame the timing gives it (#21406, Avoided Traps: a stable layout proves nothing).
The Architectural Reality
Neo.component.Canvas#drawn_ (src/component/Canvas.mjs:27, PR #21409): true while the pixels show the current content, set only by the part that knows that moment, reflected as data-drawn.
Neo.canvas.GraphScene#whenDrawn() (src/canvas/GraphScene.mjs:1508, PR #21409): a remote that answers after the owed frame drew; the example sets drawn from it.
- The chart lives in the main thread. The wrapper knows it only through the addon's remotes;
createChart() (AmChart.mjs:183) sends the create 50 ms late and cancels a stale one.
- amCharts 4 has
isReady() and the ready and datavalidated events (checked in the core.js that neomjs/pages serves as the fallback).
- Six app views use the wrapper too (covid, sharedcovid, colors). They get the signal without a change.
The Fix
Neo.main.addon.AmCharts gains a remote whenDrawn({id}). It answers true once the chart is ready and its latest data validated (at once when it already is), and false when the chart is destroyed or replaced first.
Neo.component.wrapper.AmChart gains drawn_ with Canvas's contract and data-drawn reflection. It asks whenDrawn after each create and each chartData change, and drops to false on a new create (a theme change included), new data, unmount and destroy. An answer for a superseded create or data set is ignored.
- The
am-charts capture recipe waits on [data-drawn='true']. The cover goes to neomjs/pages first, then examples.json names it.
Contract Ledger
| Surface |
Source of authority |
Behavior |
Fallback |
Docs |
Evidence |
Neo.component.wrapper.AmChart#drawn_ (new) |
Canvas#drawn_ (PR #21409) |
true while the chart shows its current data; data-drawn mirrors it |
false |
JSDoc |
unit spec |
Neo.main.addon.AmCharts#whenDrawn (new remote, app) |
GraphScene#whenDrawn (PR #21409) |
true after ready + data validated; false if destroyed or replaced |
false |
JSDoc |
unit spec |
Decision Record impact: none.
Acceptance Criteria
Out of Scope
- amCharts v5 (Discussion #20309) and examples for the maps package.
- Covers for the app views that use the wrapper.
- Changing what
create() answers: onChartMounted() keeps meaning "created".
Avoided Traps
- The main thread stamping
data-drawn on the DOM: the app worker would not know what the DOM shows, and NL tests read the component. The component owns the flag, as Canvas does.
- Making
create() answer late: create is queued until the addon is ready, and its answer means "created" to every onChartMounted() override.
- A delay or an SVG-exists wait in the recipe: it captures whichever frame the timing gives.
Related
Parent #21367 · #21406 / PR #21409 (Canvas#drawn_, GraphScene#whenDrawn) · #21400 / PR #21401 (amCharts text) · #21484 / PR #21486 (catalog totals) · Discussion #20309.
Live latest-open + closed sweep: latest 20 open read, plus open and closed searches for "amCharts cover", "AmChart drawn", "am-charts" and "amCharts pie" at 2026-11-19T14:38Z; the closed hits #21400, #21406 and #21322 carry the deferral above and no exclusion. Open count 78 (red band), folded under #21367. A2A in-flight sweep: latest 30 messages in all read-states up to 14:35:59Z, no claim on this scope. Memory Core sweep ("amCharts pie card has no cover; chart wrapper cannot tell when it is drawn", 5 results): no prior decision. Own assignments: 12 open, none overlapping. Structure map: N/A (src/component/wrapper, src/main/addon, portal data; no Agent OS placement).
Retrieval Hint: "amCharts wrapper drawn signal whenDrawn am-charts cover"
Owned work, no contributor labels: Vega builds it under #21367 for the Engine 14 lock (Sun 22 Nov, 18:00 CET).
Context
The
am-chartscard in Charts, Canvas & Maps (apps/portal/resources/data/examples.json:928) has no cover ("image": null). Charts part 2 deferred it because its labels drew only after #21400 (PR #21401), which closed on 19 Nov (#21406, Out of Scope). The epic's cover rule (#21367): a card publishes only with a cover taken after its content is drawn, and a canvas scene needs a drawn signal on the DOM.#21406left other renderers' signals for "when an example or test needs it". This card needs one now.The Problem
Nothing tells a capture that the pie is drawn.
Neo.main.addon.AmCharts#create()(src/main/addon/AmCharts.mjs:152) returns as soon asam4core.createFromConfigreturns; amCharts validates the data and draws in later frames. The wrapper'sonChartMounted()(src/component/wrapper/AmChart.mjs:240) runs on that early answer. A recipe that waits for the SVG or a fixed delay publishes whichever frame the timing gives it (#21406, Avoided Traps: a stable layout proves nothing).The Architectural Reality
Neo.component.Canvas#drawn_(src/component/Canvas.mjs:27, PR #21409): true while the pixels show the current content, set only by the part that knows that moment, reflected asdata-drawn.Neo.canvas.GraphScene#whenDrawn()(src/canvas/GraphScene.mjs:1508, PR #21409): a remote that answers after the owed frame drew; the example setsdrawnfrom it.createChart()(AmChart.mjs:183) sends the create 50 ms late and cancels a stale one.isReady()and thereadyanddatavalidatedevents (checked in thecore.jsthatneomjs/pagesserves as the fallback).The Fix
Neo.main.addon.AmChartsgains a remotewhenDrawn({id}). It answerstrueonce the chart is ready and its latest data validated (at once when it already is), andfalsewhen the chart is destroyed or replaced first.Neo.component.wrapper.AmChartgainsdrawn_with Canvas's contract anddata-drawnreflection. It askswhenDrawnafter each create and eachchartDatachange, and drops tofalseon a new create (a theme change included), new data, unmount and destroy. An answer for a superseded create or data set is ignored.am-chartscapture recipe waits on[data-drawn='true']. The cover goes toneomjs/pagesfirst, thenexamples.jsonnames it.Contract Ledger
Neo.component.wrapper.AmChart#drawn_(new)Canvas#drawn_(PR #21409)data-drawnmirrors itfalseNeo.main.addon.AmCharts#whenDrawn(new remote, app)GraphScene#whenDrawn(PR #21409)trueafter ready + data validated;falseif destroyed or replacedfalseDecision Record impact: none.
Acceptance Criteria
whenDrawn({id})answerstrueafterreadyand the latest data'sdatavalidated,trueat once for a drawn chart, andfalsefor a chart destroyed or replaced first (test/playwright/unit/main/addon/, stubbedam4core).drawnturnstrueonly from the answer for its latest create and data; a theme re-create, newchartData, unmount and destroy set itfalse;data-drawnmirrors it (test/playwright/unit/component/).am-chartswith a cover captured afterdata-drawn; three capture runs give byte-identical covers; a mergedneomjs/pagesPR serves the cover before the neo PR merges.seo.jsonfromgetSeoJson()).Out of Scope
create()answers:onChartMounted()keeps meaning "created".Avoided Traps
data-drawnon the DOM: the app worker would not know what the DOM shows, and NL tests read the component. The component owns the flag, as Canvas does.create()answer late:createis queued until the addon is ready, and its answer means "created" to everyonChartMounted()override.Related
Parent #21367 · #21406 / PR #21409 (
Canvas#drawn_,GraphScene#whenDrawn) · #21400 / PR #21401 (amCharts text) · #21484 / PR #21486 (catalog totals) · Discussion #20309.Live latest-open + closed sweep: latest 20 open read, plus open and closed searches for "amCharts cover", "AmChart drawn", "am-charts" and "amCharts pie" at 2026-11-19T14:38Z; the closed hits #21400, #21406 and #21322 carry the deferral above and no exclusion. Open count 78 (red band), folded under #21367. A2A in-flight sweep: latest 30 messages in all read-states up to 14:35:59Z, no claim on this scope. Memory Core sweep ("amCharts pie card has no cover; chart wrapper cannot tell when it is drawn", 5 results): no prior decision. Own assignments: 12 open, none overlapping. Structure map: N/A (
src/component/wrapper,src/main/addon, portal data; no Agent OS placement).Retrieval Hint: "amCharts wrapper drawn signal whenDrawn am-charts cover"