Production
Available
v1.0.0
Retail Gross Revenue Breakdown
Revenue components by month
Live preview
Rendered from sample data fed via .data — exactly how your app feeds it.
Data contract
| Column | Type | Req |
|---|---|---|
| Category | string | ✓ |
| Value | number | ✓ |
| Series | string | — |
Emits ready,
error and
widget-select
when a mark is clicked —
wiring up drill-down.
Embed code
URL:
Colours:
<!-- 1. Load the widget (self-registers <afn-grossprofitbreakdown>) -->
<script type="module" src="https://widgets-d.afnai.com/cdn/afn-grossprofitbreakdown/v1/afn-grossprofitbreakdown.js"></script>
<!-- 2. Drop the tag -->
<afn-grossprofitbreakdown id="w"></afn-grossprofitbreakdown>
<!-- 3. Feed your data -->
<script>
const el = document.querySelector('#w');
el.data = [
{"Category":"Apr","Series":"Gross Profit","Value":1200000},
{"Category":"Apr","Series":"Lender Credit","Value":320000},
{"Category":"Apr","Series":"Commission Paid","Value":410000},
{"Category":"May","Series":"Gross Profit","Value":1340000},
{"Category":"May","Series":"Lender Credit","Value":360000},
{"Category":"May","Series":"Commission Paid","Value":450000},
{"Category":"Jun","Series":"Gross Profit","Value":1420000},
{"Category":"Jun","Series":"Lender Credit","Value":390000},
{"Category":"Jun","Series":"Commission Paid","Value":470000}
];
</script>
v1 gets non-breaking fixes automatically; a breaking change bumps to the next major and never touches your embed.
Bring-your-own-data: your app feeds the rows via .data.
Integration guide — framework setup, versioning and the origin allowlist.