chartlet 0.23.0

Compile structured data into deterministic, accessible static charts
Documentation
1
<div class="chartlet-wrapper"><style>.chartlet-stage{position:relative;display:inline-block;max-width:100%;vertical-align:top}.chartlet-stage>svg{display:block}.chartlet-hotspot{position:absolute;border-radius:8px;cursor:pointer}.chartlet-focus{margin:0 0 12px 0;font-size:13px}.chartlet-focus summary{cursor:pointer;min-height:24px}.chartlet-focus fieldset{border:none;padding:0;margin:4px 0 0 0}.chartlet-focus label{display:inline-flex;align-items:center;min-height:44px;margin-right:14px;cursor:pointer;white-space:nowrap}.chartlet-focus input{margin-right:4px}.chartlet-focus input:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.chartlet-wrapper:has(.chartlet-focus-node:checked) #chartlet-0764a266fd1dbc2f .chartlet-f{opacity:.18}#chartlet-0764a266fd1dbc2f-hs-0{left:56.889%;top:11.392%;width:14.222%;height:16.456%}#chartlet-0764a266fd1dbc2f-hs-1{left:28%;top:45.57%;width:25.778%;height:12.658%}#chartlet-0764a266fd1dbc2f-hs-2{left:13.333%;top:68.354%;width:25.778%;height:13.924%}#chartlet-0764a266fd1dbc2f-hs-3{left:42.222%;top:68.354%;width:25.778%;height:13.924%}#chartlet-0764a266fd1dbc2f-hs-4{left:56.889%;top:45.57%;width:14.222%;height:12.658%}#chartlet-0764a266fd1dbc2f-hs-5{left:74.222%;top:45.57%;width:12.444%;height:12.658%}.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-0:checked) #chartlet-0764a266fd1dbc2f .chartlet-f-0{opacity:1}.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-0:checked) #chartlet-0764a266fd1dbc2f .chartlet-n-0 .chartlet-flow-node,.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-0:checked) #chartlet-0764a266fd1dbc2f .chartlet-n-0 .chartlet-seq-box{stroke-width:3}.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-1:checked) #chartlet-0764a266fd1dbc2f .chartlet-f-1{opacity:1}.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-1:checked) #chartlet-0764a266fd1dbc2f .chartlet-n-1 .chartlet-flow-node,.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-1:checked) #chartlet-0764a266fd1dbc2f .chartlet-n-1 .chartlet-seq-box{stroke-width:3}.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-2:checked) #chartlet-0764a266fd1dbc2f .chartlet-f-2{opacity:1}.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-2:checked) #chartlet-0764a266fd1dbc2f .chartlet-n-2 .chartlet-flow-node,.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-2:checked) #chartlet-0764a266fd1dbc2f .chartlet-n-2 .chartlet-seq-box{stroke-width:3}.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-3:checked) #chartlet-0764a266fd1dbc2f .chartlet-f-3{opacity:1}.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-3:checked) #chartlet-0764a266fd1dbc2f .chartlet-n-3 .chartlet-flow-node,.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-3:checked) #chartlet-0764a266fd1dbc2f .chartlet-n-3 .chartlet-seq-box{stroke-width:3}.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-4:checked) #chartlet-0764a266fd1dbc2f .chartlet-f-4{opacity:1}.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-4:checked) #chartlet-0764a266fd1dbc2f .chartlet-n-4 .chartlet-flow-node,.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-4:checked) #chartlet-0764a266fd1dbc2f .chartlet-n-4 .chartlet-seq-box{stroke-width:3}.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-5:checked) #chartlet-0764a266fd1dbc2f .chartlet-f-5{opacity:1}.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-5:checked) #chartlet-0764a266fd1dbc2f .chartlet-n-5 .chartlet-flow-node,.chartlet-wrapper:has(#chartlet-0764a266fd1dbc2f-focus-5:checked) #chartlet-0764a266fd1dbc2f .chartlet-n-5 .chartlet-seq-box{stroke-width:3}</style><details class="chartlet-focus"><summary>Focus</summary><fieldset><label><input type="radio" name="chartlet-0764a266fd1dbc2f-focus" checked> Show all</label><label><input type="radio" name="chartlet-0764a266fd1dbc2f-focus" class="chartlet-focus-node" id="chartlet-0764a266fd1dbc2f-focus-0"> Order</label><label><input type="radio" name="chartlet-0764a266fd1dbc2f-focus" class="chartlet-focus-node" id="chartlet-0764a266fd1dbc2f-focus-1"> Payment</label><label><input type="radio" name="chartlet-0764a266fd1dbc2f-focus" class="chartlet-focus-node" id="chartlet-0764a266fd1dbc2f-focus-2"> CardPayment</label><label><input type="radio" name="chartlet-0764a266fd1dbc2f-focus" class="chartlet-focus-node" id="chartlet-0764a266fd1dbc2f-focus-3"> WalletPayment</label><label><input type="radio" name="chartlet-0764a266fd1dbc2f-focus" class="chartlet-focus-node" id="chartlet-0764a266fd1dbc2f-focus-4"> PaperInvoice</label><label><input type="radio" name="chartlet-0764a266fd1dbc2f-focus" class="chartlet-focus-node" id="chartlet-0764a266fd1dbc2f-focus-5"> Receipt</label></fieldset></details><figure class="chartlet-figure" data-viz="chart"><figcaption>Payments after the redesign</figcaption><div class="chartlet-stage"><svg xmlns="http://www.w3.org/2000/svg" width="900" height="632" viewBox="0 0 900 632" id="chartlet-0764a266fd1dbc2f" role="img" aria-labelledby="chartlet-0764a266fd1dbc2f-title chartlet-0764a266fd1dbc2f-description" class="chartlet-root"><title id="chartlet-0764a266fd1dbc2f-title">Payments after the redesign</title><desc id="chartlet-0764a266fd1dbc2f-description">Class diagram with 6 classes and 5 relations. Most connected: Order and Payment (3 connections each). Order: 2 attributes, 1 method. Order depends on Payment [paid by]; is associated with PaperInvoice (1 : 0..1); is composed of Receipt (1 : 0..*). Payment: 0 attributes, 1 method. CardPayment: 1 attribute, 1 method. CardPayment implements Payment. WalletPayment: 1 attribute, 1 method. WalletPayment implements Payment. PaperInvoice: 2 attributes, 0 methods. Receipt: 2 attributes, 0 methods. Roles: critical: Order, Order → Payment; planned: WalletPayment, Order → Receipt; deprecated: PaperInvoice, Order → PaperInvoice.</desc><style>.chartlet-root{--chartlet-text:#172033;--chartlet-muted:#344054;--chartlet-grid:#d9dee8;--chartlet-zero:#667085;--chartlet-accent:#2563eb;--chartlet-background:#fff;--chartlet-color-1:#2563eb;--chartlet-color-2:#c2410c;--chartlet-color-3:#475569;--chartlet-color-4:#111827;max-width:100%;height:auto;font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:var(--chartlet-text)}#chartlet-0764a266fd1dbc2f .chartlet-title{font-size:22px;font-weight:650;fill:var(--chartlet-text)}#chartlet-0764a266fd1dbc2f .chartlet-label,#chartlet-0764a266fd1dbc2f .chartlet-tick,#chartlet-0764a266fd1dbc2f .chartlet-value,#chartlet-0764a266fd1dbc2f .chartlet-value-inverse,#chartlet-0764a266fd1dbc2f .chartlet-axis-title{font-size:12px;fill:var(--chartlet-muted)}#chartlet-0764a266fd1dbc2f .chartlet-value,#chartlet-0764a266fd1dbc2f .chartlet-value-inverse{font-weight:600}#chartlet-0764a266fd1dbc2f .chartlet-value{fill:var(--chartlet-text)}#chartlet-0764a266fd1dbc2f .chartlet-value-inverse{fill:var(--chartlet-background)}#chartlet-0764a266fd1dbc2f .chartlet-axis-title{font-weight:600}#chartlet-0764a266fd1dbc2f .chartlet-grid{stroke:var(--chartlet-grid);stroke-width:1}#chartlet-0764a266fd1dbc2f .chartlet-zero{stroke:var(--chartlet-zero);stroke-width:1.5}#chartlet-0764a266fd1dbc2f .chartlet-bar,#chartlet-0764a266fd1dbc2f .chartlet-point{fill:var(--chartlet-accent)}#chartlet-0764a266fd1dbc2f .chartlet-line{fill:none;stroke:var(--chartlet-accent);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}#chartlet-0764a266fd1dbc2f .chartlet-background{fill:var(--chartlet-background)}.chartlet-root{--chartlet-node:#eef3fd;--chartlet-lane:#f7f9fc;--chartlet-lane-head:#eef1f6;--chartlet-shadow:rgba(16,24,40,.09);--chartlet-role-blue:#2563eb;--chartlet-role-blue-fill:#eef3fd;--chartlet-role-green:#15803d;--chartlet-role-green-fill:#ecfdf3;--chartlet-role-amber:#b45309;--chartlet-role-amber-fill:#fff7e8;--chartlet-role-teal:#0f766e;--chartlet-role-teal-fill:#e9faf7;--chartlet-role-violet:#6d28d9;--chartlet-role-violet-fill:#f3efff;--chartlet-role-gray:#667085;--chartlet-role-gray-fill:#f7f8fa;--chartlet-role-red:#b42318;--chartlet-role-red-fill:#fef3f2}.chartlet-root.chartlet-theme-dark{--chartlet-node:#1a2436;--chartlet-lane:#121925;--chartlet-lane-head:#18212f;--chartlet-shadow:rgba(0,0,0,.45);--chartlet-role-blue:#7ea6ff;--chartlet-role-blue-fill:#1a2436;--chartlet-role-green:#4ade80;--chartlet-role-green-fill:#132a1d;--chartlet-role-amber:#fbbf24;--chartlet-role-amber-fill:#2b2210;--chartlet-role-teal:#2dd4bf;--chartlet-role-teal-fill:#0f2a27;--chartlet-role-violet:#b69cff;--chartlet-role-violet-fill:#231c38;--chartlet-role-gray:#9aa7bd;--chartlet-role-gray-fill:#161d29;--chartlet-role-red:#f97066;--chartlet-role-red-fill:#2d1616}#chartlet-0764a266fd1dbc2f .chartlet-role-blue{fill:var(--chartlet-role-blue-fill);stroke:var(--chartlet-role-blue)}#chartlet-0764a266fd1dbc2f .chartlet-role-green{fill:var(--chartlet-role-green-fill);stroke:var(--chartlet-role-green)}#chartlet-0764a266fd1dbc2f .chartlet-role-amber{fill:var(--chartlet-role-amber-fill);stroke:var(--chartlet-role-amber)}#chartlet-0764a266fd1dbc2f .chartlet-role-teal{fill:var(--chartlet-role-teal-fill);stroke:var(--chartlet-role-teal)}#chartlet-0764a266fd1dbc2f .chartlet-role-violet{fill:var(--chartlet-role-violet-fill);stroke:var(--chartlet-role-violet)}#chartlet-0764a266fd1dbc2f .chartlet-role-gray{fill:var(--chartlet-role-gray-fill);stroke:var(--chartlet-role-gray)}#chartlet-0764a266fd1dbc2f .chartlet-role-red{fill:var(--chartlet-role-red-fill);stroke:var(--chartlet-role-red)}#chartlet-0764a266fd1dbc2f .chartlet-diagram-rim{fill:none;stroke:var(--chartlet-role-teal);stroke-width:1.5}#chartlet-0764a266fd1dbc2f .chartlet-diagram-shadow{fill:var(--chartlet-shadow);stroke:none;rx:7px}#chartlet-0764a266fd1dbc2f .chartlet-diagram-chip{fill:var(--chartlet-background);stroke:var(--chartlet-grid);stroke-width:1;rx:4px}#chartlet-0764a266fd1dbc2f .chartlet-diagram-chip-text{font-size:12px;fill:var(--chartlet-text)}#chartlet-0764a266fd1dbc2f .chartlet-diagram-badge{fill:var(--chartlet-accent);stroke:var(--chartlet-background);stroke-width:2}#chartlet-0764a266fd1dbc2f .chartlet-diagram-badge-text{font-size:10px;font-weight:700;fill:var(--chartlet-background)}#chartlet-0764a266fd1dbc2f .chartlet-flow-node{stroke-width:1.5;stroke-linejoin:round;rx:7px}#chartlet-0764a266fd1dbc2f .chartlet-flow-start{stroke-width:2}#chartlet-0764a266fd1dbc2f .chartlet-flow-end{stroke-width:3}#chartlet-0764a266fd1dbc2f .chartlet-flow-external{stroke-dasharray:5 3}#chartlet-0764a266fd1dbc2f .chartlet-flow-inner{stroke:var(--chartlet-role-blue);stroke-width:1}#chartlet-0764a266fd1dbc2f .chartlet-flow-label{font-size:13px;font-weight:600;fill:var(--chartlet-text)}#chartlet-0764a266fd1dbc2f .chartlet-flow-sublabel{font-size:11px;fill:var(--chartlet-muted)}#chartlet-0764a266fd1dbc2f .chartlet-flow-edge{fill:none;stroke:var(--chartlet-zero);stroke-width:1.4;stroke-linejoin:round}#chartlet-0764a266fd1dbc2f .chartlet-flow-dashed{stroke-dasharray:5 4}#chartlet-0764a266fd1dbc2f .chartlet-flow-dotted{stroke-dasharray:1 4;stroke-linecap:round}#chartlet-0764a266fd1dbc2f .chartlet-flow-main{stroke:var(--chartlet-accent);stroke-width:2.2}#chartlet-0764a266fd1dbc2f .chartlet-flow-head{fill:var(--chartlet-zero);stroke:var(--chartlet-zero);stroke-width:1;stroke-linejoin:round}#chartlet-0764a266fd1dbc2f .chartlet-flow-main-head{fill:var(--chartlet-accent);stroke:var(--chartlet-accent)}#chartlet-0764a266fd1dbc2f .chartlet-flow-lane{fill:var(--chartlet-lane);stroke:var(--chartlet-grid);stroke-width:1}#chartlet-0764a266fd1dbc2f .chartlet-flow-lane-alt{fill:var(--chartlet-background)}#chartlet-0764a266fd1dbc2f .chartlet-flow-lane-head{fill:var(--chartlet-lane-head);stroke:none}#chartlet-0764a266fd1dbc2f .chartlet-flow-lane-label{font-size:11px;font-weight:650;fill:var(--chartlet-muted);letter-spacing:.04em}#chartlet-0764a266fd1dbc2f .chartlet-flow-group{fill:var(--chartlet-accent);fill-opacity:.04;stroke:var(--chartlet-zero);stroke-width:1;stroke-dasharray:4 3;rx:10px}#chartlet-0764a266fd1dbc2f .chartlet-flow-group-label{font-size:11px;font-weight:600;fill:var(--chartlet-muted)}#chartlet-0764a266fd1dbc2f .chartlet-class-member{font-size:12px;fill:var(--chartlet-text)}#chartlet-0764a266fd1dbc2f .chartlet-flow-card{font-size:11px;fill:var(--chartlet-muted)}#chartlet-0764a266fd1dbc2f .chartlet-flow-hollow{fill:var(--chartlet-background)}#chartlet-0764a266fd1dbc2f .chartlet-flow-solid{fill:var(--chartlet-zero)}#chartlet-0764a266fd1dbc2f .chartlet-flow-open{fill:none;stroke:var(--chartlet-zero);stroke-width:1.4;stroke-linejoin:round}#chartlet-0764a266fd1dbc2f .chartlet-flow-role-critical .chartlet-flow-node{stroke:var(--chartlet-role-red);stroke-width:3}#chartlet-0764a266fd1dbc2f .chartlet-flow-role-planned .chartlet-flow-node{stroke:var(--chartlet-role-violet);stroke-dasharray:6 3}#chartlet-0764a266fd1dbc2f .chartlet-flow-role-deprecated .chartlet-flow-node{stroke:var(--chartlet-role-gray);stroke-dasharray:1.5 3}#chartlet-0764a266fd1dbc2f .chartlet-flow-role-critical .chartlet-flow-edge{stroke:var(--chartlet-role-red);stroke-width:2.6}#chartlet-0764a266fd1dbc2f .chartlet-flow-role-planned .chartlet-flow-edge{stroke:var(--chartlet-role-violet);stroke-dasharray:6 4}#chartlet-0764a266fd1dbc2f .chartlet-flow-role-deprecated .chartlet-flow-edge{stroke:var(--chartlet-role-gray);stroke-dasharray:1 4;stroke-linecap:round}#chartlet-0764a266fd1dbc2f .chartlet-flow-role-critical .chartlet-flow-head,#chartlet-0764a266fd1dbc2f .chartlet-flow-role-critical .chartlet-diagram-badge{fill:var(--chartlet-role-red);stroke:var(--chartlet-role-red)}#chartlet-0764a266fd1dbc2f .chartlet-flow-role-planned .chartlet-flow-head,#chartlet-0764a266fd1dbc2f .chartlet-flow-role-planned .chartlet-diagram-badge{fill:var(--chartlet-role-violet);stroke:var(--chartlet-role-violet)}#chartlet-0764a266fd1dbc2f .chartlet-flow-role-deprecated .chartlet-flow-head,#chartlet-0764a266fd1dbc2f .chartlet-flow-role-deprecated .chartlet-diagram-badge{fill:var(--chartlet-role-gray);stroke:var(--chartlet-role-gray)}#chartlet-0764a266fd1dbc2f .chartlet-legend{font-size:12px;fill:var(--chartlet-muted)}#chartlet-0764a266fd1dbc2f .chartlet-flow-role-critical .chartlet-flow-hollow,#chartlet-0764a266fd1dbc2f .chartlet-flow-role-planned .chartlet-flow-hollow,#chartlet-0764a266fd1dbc2f .chartlet-flow-role-deprecated .chartlet-flow-hollow{fill:var(--chartlet-background)}#chartlet-0764a266fd1dbc2f .chartlet-flow-role-critical .chartlet-flow-open{stroke:var(--chartlet-role-red)}#chartlet-0764a266fd1dbc2f .chartlet-flow-role-planned .chartlet-flow-open{stroke:var(--chartlet-role-violet)}#chartlet-0764a266fd1dbc2f .chartlet-flow-role-deprecated .chartlet-flow-open{stroke:var(--chartlet-role-gray)}</style><g class="chartlet-f chartlet-f-0 chartlet-f-1 chartlet-flow-role-critical"><polyline points="552,176 552,248 368,248 368,280" class="chartlet-flow-edge chartlet-flow-dashed"><title>Order → Payment: paid by</title></polyline><polyline points="364.5,280 368,288 371.5,280" class="chartlet-flow-open"/></g><g class="chartlet-f chartlet-f-1 chartlet-f-2"><polyline points="356,380 356,390.4 236,390.4 236,432" class="chartlet-flow-edge chartlet-flow-dashed"><title>Payment → CardPayment</title></polyline><polyline points="356,368 362,380 350,380 356,368" class="chartlet-flow-head chartlet-flow-hollow"/></g><g class="chartlet-f chartlet-f-1 chartlet-f-3"><polyline points="380,380 380,390.4 496,390.4 496,432" class="chartlet-flow-edge chartlet-flow-dashed"><title>Payment → WalletPayment</title></polyline><polyline points="380,368 386,380 374,380 380,368" class="chartlet-flow-head chartlet-flow-hollow"/></g><g class="chartlet-f chartlet-f-0 chartlet-f-4 chartlet-flow-role-deprecated"><polyline points="576,176 576,288" class="chartlet-flow-edge"><title>Order → PaperInvoice</title></polyline><text x="564" y="284" text-anchor="end" class="chartlet-flow-card">0..1</text><text x="564" y="188" text-anchor="end" class="chartlet-flow-card">1</text></g><g class="chartlet-f chartlet-f-0 chartlet-f-5 chartlet-flow-role-planned"><polyline points="600,192 600,248 724,248 724,288" class="chartlet-flow-edge"><title>Order → Receipt</title></polyline><text x="712" y="284" text-anchor="end" class="chartlet-flow-card">0..*</text><polyline points="600,176 605,184 600,192 595,184 600,176" class="chartlet-flow-head chartlet-flow-solid"/><text x="588" y="204" text-anchor="end" class="chartlet-flow-card">1</text></g><g class="chartlet-f chartlet-n-0 chartlet-f-0 chartlet-f-1 chartlet-f-4 chartlet-f-5"></g><g class="chartlet-f chartlet-n-1 chartlet-f-0 chartlet-f-1 chartlet-f-2 chartlet-f-3"></g><g class="chartlet-f chartlet-n-2 chartlet-f-1 chartlet-f-2"></g><g class="chartlet-f chartlet-n-3 chartlet-f-1 chartlet-f-3"></g><g class="chartlet-f chartlet-n-4 chartlet-f-0 chartlet-f-4"></g><g class="chartlet-f chartlet-n-5 chartlet-f-0 chartlet-f-5"></g><g class="chartlet-f chartlet-f-0 chartlet-f-1"><rect x="496.96" y="181" width="51.04" height="21" class="chartlet-diagram-chip"/><text x="543" y="195" text-anchor="end" class="chartlet-diagram-chip-text">paid by</text></g><g class="chartlet-f chartlet-n-0 chartlet-f-0 chartlet-f-1 chartlet-f-4 chartlet-f-5 chartlet-flow-role-critical"><rect x="512" y="74.5" width="128" height="104" class="chartlet-diagram-shadow"/><rect x="512" y="72" width="128" height="104" class="chartlet-flow-node chartlet-role-blue chartlet-class"><title>Order</title></rect><text x="576" y="98" text-anchor="middle" class="chartlet-flow-label">Order</text><line x1="512" y1="104" x2="640" y2="104" class="chartlet-flow-inner"/><text x="524" y="121" text-anchor="start" class="chartlet-class-member">+ id: Int</text><text x="524" y="136" text-anchor="start" class="chartlet-class-member">+ total: Money</text><line x1="512" y1="146" x2="640" y2="146" class="chartlet-flow-inner"/><text x="524" y="163" text-anchor="start" class="chartlet-class-member">+ pay(): Receipt</text><circle cx="512" cy="72" r="8" class="chartlet-diagram-badge"/><text x="512" y="75.5" text-anchor="middle" class="chartlet-diagram-badge-text">!</text></g><g class="chartlet-f chartlet-n-1 chartlet-f-0 chartlet-f-1 chartlet-f-2 chartlet-f-3"><rect x="252" y="290.5" width="232" height="80" class="chartlet-diagram-shadow"/><rect x="252" y="288" width="232" height="80" class="chartlet-flow-node chartlet-role-blue chartlet-class"><title>Payment – «interface»</title></rect><text x="368" y="311" text-anchor="middle" class="chartlet-flow-sublabel">«interface»</text><text x="368" y="328" text-anchor="middle" class="chartlet-flow-label">Payment</text><line x1="252" y1="334" x2="484" y2="334" class="chartlet-flow-inner"/><text x="264" y="351" text-anchor="start" class="chartlet-class-member">+ charge(amount: Money): Receipt</text></g><g class="chartlet-f chartlet-n-2 chartlet-f-1 chartlet-f-2"><rect x="120" y="434.5" width="232" height="88" class="chartlet-diagram-shadow"/><rect x="120" y="432" width="232" height="88" class="chartlet-flow-node chartlet-role-blue chartlet-class"><title>CardPayment</title></rect><text x="236" y="458" text-anchor="middle" class="chartlet-flow-label">CardPayment</text><line x1="120" y1="464" x2="352" y2="464" class="chartlet-flow-inner"/><text x="132" y="481" text-anchor="start" class="chartlet-class-member">- token: String</text><line x1="120" y1="491" x2="352" y2="491" class="chartlet-flow-inner"/><text x="132" y="508" text-anchor="start" class="chartlet-class-member">+ charge(amount: Money): Receipt</text></g><g class="chartlet-f chartlet-n-3 chartlet-f-1 chartlet-f-3 chartlet-flow-role-planned"><rect x="380" y="434.5" width="232" height="88" class="chartlet-diagram-shadow"/><rect x="380" y="432" width="232" height="88" class="chartlet-flow-node chartlet-role-blue chartlet-class"><title>WalletPayment</title></rect><text x="496" y="458" text-anchor="middle" class="chartlet-flow-label">WalletPayment</text><line x1="380" y1="464" x2="612" y2="464" class="chartlet-flow-inner"/><text x="392" y="481" text-anchor="start" class="chartlet-class-member">- walletId: String</text><line x1="380" y1="491" x2="612" y2="491" class="chartlet-flow-inner"/><text x="392" y="508" text-anchor="start" class="chartlet-class-member">+ charge(amount: Money): Receipt</text><circle cx="380" cy="432" r="8" class="chartlet-diagram-badge"/><text x="380" y="435.5" text-anchor="middle" class="chartlet-diagram-badge-text">+</text></g><g class="chartlet-f chartlet-n-4 chartlet-f-0 chartlet-f-4 chartlet-flow-role-deprecated"><rect x="512" y="290.5" width="128" height="80" class="chartlet-diagram-shadow"/><rect x="512" y="288" width="128" height="80" class="chartlet-flow-node chartlet-role-blue chartlet-class"><title>PaperInvoice</title></rect><text x="576" y="314" text-anchor="middle" class="chartlet-flow-label">PaperInvoice</text><line x1="512" y1="320" x2="640" y2="320" class="chartlet-flow-inner"/><text x="524" y="337" text-anchor="start" class="chartlet-class-member">+ number: String</text><text x="524" y="352" text-anchor="start" class="chartlet-class-member">+ dueAt: Date</text><circle cx="512" cy="288" r="8" class="chartlet-diagram-badge"/><text x="512" y="291.5" text-anchor="middle" class="chartlet-diagram-badge-text">−</text></g><g class="chartlet-f chartlet-n-5 chartlet-f-0 chartlet-f-5"><rect x="668" y="290.5" width="112" height="80" class="chartlet-diagram-shadow"/><rect x="668" y="288" width="112" height="80" class="chartlet-flow-node chartlet-role-blue chartlet-class"><title>Receipt</title></rect><text x="724" y="314" text-anchor="middle" class="chartlet-flow-label">Receipt</text><line x1="668" y1="320" x2="780" y2="320" class="chartlet-flow-inner"/><text x="680" y="337" text-anchor="start" class="chartlet-class-member">+ id: String</text><text x="680" y="352" text-anchor="start" class="chartlet-class-member">+ paidAt: Date</text></g><g class="chartlet-flow-role-critical"><circle cx="32" cy="614" r="8" class="chartlet-diagram-badge"/><text x="32" y="617.5" text-anchor="middle" class="chartlet-diagram-badge-text">!</text><line x1="46" y1="614" x2="68" y2="614" class="chartlet-flow-edge"/></g><text x="74" y="618" text-anchor="start" class="chartlet-legend">Critical</text><g class="chartlet-flow-role-planned"><circle cx="147.72" cy="614" r="8" class="chartlet-diagram-badge"/><text x="147.72" y="617.5" text-anchor="middle" class="chartlet-diagram-badge-text">+</text><line x1="161.72" y1="614" x2="183.72" y2="614" class="chartlet-flow-edge"/></g><text x="189.72" y="618" text-anchor="start" class="chartlet-legend">Planned</text><g class="chartlet-flow-role-deprecated"><circle cx="262.96" cy="614" r="8" class="chartlet-diagram-badge"/><text x="262.96" y="617.5" text-anchor="middle" class="chartlet-diagram-badge-text">−</text><line x1="276.96" y1="614" x2="298.96" y2="614" class="chartlet-flow-edge"/></g><text x="304.96" y="618" text-anchor="start" class="chartlet-legend">Deprecated</text></svg><label class="chartlet-hotspot" id="chartlet-0764a266fd1dbc2f-hs-0" for="chartlet-0764a266fd1dbc2f-focus-0"></label><label class="chartlet-hotspot" id="chartlet-0764a266fd1dbc2f-hs-1" for="chartlet-0764a266fd1dbc2f-focus-1"></label><label class="chartlet-hotspot" id="chartlet-0764a266fd1dbc2f-hs-2" for="chartlet-0764a266fd1dbc2f-focus-2"></label><label class="chartlet-hotspot" id="chartlet-0764a266fd1dbc2f-hs-3" for="chartlet-0764a266fd1dbc2f-focus-3"></label><label class="chartlet-hotspot" id="chartlet-0764a266fd1dbc2f-hs-4" for="chartlet-0764a266fd1dbc2f-focus-4"></label><label class="chartlet-hotspot" id="chartlet-0764a266fd1dbc2f-hs-5" for="chartlet-0764a266fd1dbc2f-focus-5"></label></div><p class="chartlet-source">Source: Illustrative domain model</p><details class="chartlet-data" data-viz-text><summary>Show chart data</summary><table><caption>Data for Payments after the redesign</caption><thead><tr><th scope="col">Item</th><th scope="col">Kind</th><th scope="col">Role</th><th scope="col">Attributes</th><th scope="col">Methods</th><th scope="col">Relations</th></tr></thead><tbody><tr><th scope="row">Order</th><td>Class</td><td>critical</td><td>+ id: Int; + total: Money</td><td>+ pay(): Receipt</td><td>depends on Payment [paid by] (critical); is associated with PaperInvoice (1 : 0..1) (deprecated); is composed of Receipt (1 : 0..*) (planned)</td></tr><tr><th scope="row">Payment</th><td>Interface</td><td></td><td></td><td>+ charge(amount: Money): Receipt</td><td></td></tr><tr><th scope="row">CardPayment</th><td>Class</td><td></td><td>- token: String</td><td>+ charge(amount: Money): Receipt</td><td>implements Payment</td></tr><tr><th scope="row">WalletPayment</th><td>Class</td><td>planned</td><td>- walletId: String</td><td>+ charge(amount: Money): Receipt</td><td>implements Payment</td></tr><tr><th scope="row">PaperInvoice</th><td>Class</td><td>deprecated</td><td>+ number: String; + dueAt: Date</td><td></td><td></td></tr><tr><th scope="row">Receipt</th><td>Class</td><td></td><td>+ id: String; + paidAt: Date</td><td></td><td></td></tr></tbody></table></details></figure></div>