AnalyticsPro
Analytics / Revenue: a date range, Compare, Export and Save as report over KPI tiles, revenue by channel with a legend you toggle, the revenue breakdown, top products and two weekly trends.
oxyn add analyticsRevenue
Gross revenue
$96,412+12.5%
Active customers
2,847+8.2%
Conversion
3.24%+0.4%
Refund rate
1.8%−0.3%
Revenue by channel
$96.4k+$7.9k
Revenue breakdown
- Gross sales$104,210
- Discounts−$4,180
- Refunds−$1,734
- Shipping$2,940
- Taxes$8,316
- Net revenue$96,412
Top products
- Yearly plan$38,400
- Team seats$24,150
- Monthly plan$18,920
- Add-ons$9,640
Sessions over time
16.4k+2.3k
Average order value
$141+$17
The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Revenue at a glance for a period: the headline numbers, where sales came from and how this week compares.
When not to use
- Mail folders with counts and labels beside a message list: use Inbox sidebar instead.
- The app frame: use App shell instead.
- An assistant docked beside a page: use AI side panel instead.
Installation
Analytics is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add analyticsUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Sample
Sample data in the Inset frame.
Revenue
Gross revenue
$96,412+12.5%
Active customers
2,847+8.2%
Conversion
3.24%+0.4%
Refund rate
1.8%−0.3%
Revenue by channel
$96.4k+$7.9k
Revenue breakdown
- Gross sales$104,210
- Discounts−$4,180
- Refunds−$1,734
- Shipping$2,940
- Taxes$8,316
- Net revenue$96,412
Top products
- Yearly plan$38,400
- Team seats$24,150
- Monthly plan$18,920
- Add-ons$9,640
Sessions over time
16.4k+2.3k
Average order value
$141+$17
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Flat
The same screen in the Flat frame.
Revenue
Gross revenue
$96,412+12.5%
Active customers
2,847+8.2%
Conversion
3.24%+0.4%
Refund rate
1.8%−0.3%
Revenue by channel
$96.4k+$7.9k
Revenue breakdown
- Gross sales$104,210
- Discounts−$4,180
- Refunds−$1,734
- Shipping$2,940
- Taxes$8,316
- Net revenue$96,412
Top products
- Yearly plan$38,400
- Team seats$24,150
- Monthly plan$18,920
- Add-ons$9,640
Sessions over time
16.4k+2.3k
Average order value
$141+$17
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Loading
Skeletons where the data will land.
Revenue
Gross revenue
Active customers
Conversion
Refund rate
Revenue by channel
Revenue breakdown
Top products
Sessions over time
Average order value
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Empty
Nothing yet: each region says what will appear and how to start.
Revenue
Gross revenue
—
Active customers
—
Conversion
—
Refund rate
—
Revenue by channel
No sales in this range
Revenue shows up here as soon as the first order is paid.
Revenue breakdown
- Gross sales$0
- Discounts$0
- Refunds$0
- Shipping$0
- Taxes$0
- Net revenue$0
Top products
Your best sellers will rank here.
Sessions over time
Nothing to compare yet.
Average order value
Nothing to compare yet.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Compare
The previous period dashed under each channel.
Revenue
Gross revenue
$96,412+12.5%
Active customers
2,847+8.2%
Conversion
3.24%+0.4%
Refund rate
1.8%−0.3%
Revenue by channel
$96.4k+12% vs before
Revenue breakdown
- Gross sales$104,210
- Discounts−$4,180
- Refunds−$1,734
- Shipping$2,940
- Taxes$8,316
- Net revenue$96,412
Top products
- Yearly plan$38,400
- Team seats$24,150
- Monthly plan$18,920
- Add-ons$9,640
Sessions over time
16.4k+2.3k
Average order value
$141+$17
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Month
Opened on the last 30 days.
Revenue
Gross revenue
$413,194+12.5%
Active customers
5,893+8.2%
Conversion
3.24%+0.4%
Refund rate
1.8%−0.3%
Revenue by channel
$413.2k+$7.9k
Revenue breakdown
- Gross sales$446,614
- Discounts−$17,914
- Refunds−$7,431
- Shipping$12,600
- Taxes$35,640
- Net revenue$413,194
Top products
- Yearly plan$164,571
- Team seats$103,500
- Monthly plan$81,086
- Add-ons$41,314
Sessions over time
70.3k+9.9k
Average order value
$141+$17
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
AnalyticsScreen
| Prop | Type | Default | Description |
|---|---|---|---|
layout | String | "inset" | `inset` or `flat`. |
state | String | "sample" | A state key. |
height | u32 | 640 | Height px. |
range | String | "7d" | The opening range: `7d`, `30d` or `90d`. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Sidebar, page, then each control in reading order |
| ←or→ in a tab row | Move between tabs |
| Escape | Close an open menu or popover; clear a search |
| ←or→ on a chart | Move the crosshair a day; the readout is announced |
| Escape on a chart | Hide the crosshair |
Accessibility
- The persona sidebar is a labelled nav with aria-current on this page.
- Tabs are a tablist with arrow keys; menus report aria-expanded and close on Escape.
- Skeletons are hidden from screen readers; every action reports what it did in a polite live region.
- Charts are labelled images with a live readout; the legend toggles are buttons with aria-pressed.
Responsive behaviour
- Authored on the 1440 × 900 canvas; the full view lays it out at the real width.
- Under 640 px the sidebar slides in from the menu button and top-bar actions keep their icons with hidden labels.
- KPI tiles go 4 → 2 columns and the chart rows stack under 980 px.
Edge cases (spec)
Authored on the 1440 × 900 stage (rule R1) and scaled to its column; the full view (/screens/analytics/full) renders at the real viewport with the state bar under it (R2). Under 640 px the sidebar slides in from a menu button and top-bar actions keep their icons with hidden labels. Under 980 px KPI tiles go to two columns and both chart rows stack; under 520 px the KPI bars hide and values wrap under their change. Every label in a row, chip or card ellipsises in a flex child with min-width 0 (R5); scripts/ovl.py finds no text overlap at 1440, 768 and 390 in light and dark.
Notes for AI
- Import
AnalyticsScreenfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
AnalyticsElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.