Chart loading
A loading skeleton for charts — line, area, bar or donut — with a shimmer sweeping toward inline-end (a slow pulse under reduced motion); a polite status region that says “Loading chart”. No JavaScript.
Real scenarios
The component as it is used in a product — not a specimen grid.
Four shapes of waiting
Match the skeleton to the chart that is coming so the layout does not jump: a line, an area, bars or a donut. The shimmer sweeps toward inline-end (right to left on this page in Persian) and turns into a slow pulse under reduced motion. Each one is a polite status region that says “Loading chart”.
Standing in for a real chart
Toggle the data: while it is "loading" the skeleton keeps the card’s title and height, then the stacked area takes its place and draws in.
Sessions by device
| Mobile | Desktop | Total | |
|---|---|---|---|
| Sat | 820 | 410 | 1,230 |
| Sun | 760 | 520 | 1,280 |
| Mon | 910 | 560 | 1,470 |
| Tue | 880 | 540 | 1,420 |
| Wed | 940 | 500 | 1,440 |
| Thu | 1,010 | 380 | 1,390 |
| Fri | 690 | 260 | 950 |
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| variant | string | line | line | area | bar | donut. |
| height / title / legend | string / string / int | 15rem / null / 2 | The plot height, a real title instead of a bone, and the legend bones. |
| label | string | «در حال بارگذاری نمودار» | What screen readers announce. |
Snippet
<div wire:loading.remove wire:target="period">
<x-nx::stacked-area … />
</div>
<x-nx::chart-loading variant="area" wire:loading wire:target="period" />