# clanbite_ranks_progress_metrics_for_level()

Progress toward the next tier for a rank that is pinned to a level (assigned by an admin) rather than earned.

The current level is the pinned one and the next level is the one after it, so the bar and the "points to go" line follow
the rank the member actually holds. Progress is measured from the pinned level's minimum to the next level's minimum and
clamped to 0-100 (a balance below the pinned level's minimum shows 0, one already past the next minimum shows 100).
Falls back to `clanbite_ranks_progress_metrics_for_balance()` when the label is not on the ladder.

```php
clanbite_ranks_progress_metrics_for_level( int $points, array $levels, string $label ): array
```

## Parameters

- `$points` (int) Points balance.
- `$levels` (list<array{label: string, min_points: int, icon_url: string}>) Levels sorted ascending by `min_points`.
- `$label` (string) Pinned level label.

## Return

`array{current_level: string, next_level: string, next_min_points: int, points_to_next: int, progress_percent: int, is_max_level: bool}` 

## Changelog

| Version | Description |
| --- | --- |
| 1.2.3 | Introduced |
