feat(view): names bent along the rings in the pie and in the rings' wide segments #5

Merged
dawid merged 1 commit from arc-labels into main 2026-11-19 14:44:58 +00:00
Owner
  • Rings: a wide segment's name now follows its ring, curved like the ring itself, instead of a straight line across it. A narrow segment keeps its name perpendicular to the circle, along the radius.
  • Pie: each slice carries its state and count along the donut, for example "OK 14", where it fits.

How it's drawn: ECharts only writes straight text, so the page draws these names itself. They're SVG text on arc paths, from the layout ECharts computed for each slice or segment, in a layer over the chart that pointer events pass through.

Details:

  • On the lower half the text runs the other way round the circle, so it reads from left to right everywhere.
  • A name is drawn whole, or with at least six characters before an ellipsis; otherwise it's left out.
  • It fades along with its segment while a legend row is hovered.
  • labels=0 turns it off.

Tests:

  • New: the bent names exist, both for whole and for half rings.
  • New: every arc runs left to right, so no name is upside down.
  • New: the pie's "OK 3" label.
  • New: labels=0 also removes the bent names.
  • 60 unit tests pass locally.

The screenshots are re-rendered.

- **Rings:** a wide segment's name now follows its ring, curved like the ring itself, instead of a straight line across it. A narrow segment keeps its name perpendicular to the circle, along the radius. - **Pie:** each slice carries its state and count along the donut, for example "OK 14", where it fits. **How it's drawn:** ECharts only writes straight text, so the page draws these names itself. They're SVG text on arc paths, from the layout ECharts computed for each slice or segment, in a layer over the chart that pointer events pass through. **Details:** - On the lower half the text runs the other way round the circle, so it reads from left to right everywhere. - A name is drawn whole, or with at least six characters before an ellipsis; otherwise it's left out. - It fades along with its segment while a legend row is hovered. - `labels=0` turns it off. **Tests:** - New: the bent names exist, both for whole and for half rings. - New: every arc runs left to right, so no name is upside down. - New: the pie's "OK 3" label. - New: `labels=0` also removes the bent names. - 60 unit tests pass locally. The screenshots are re-rendered.
feat(view): names bent along the rings in the pie and in the rings' wide segments
All checks were successful
CI / unit (pull_request) Successful in 1m29s
CI / integration (Checkmk 2.4) (pull_request) Successful in 5m10s
CI / integration (Checkmk 2.5) (pull_request) Successful in 5m19s
CI / integration (update 2.4 to 2.5) (pull_request) Successful in 7m47s
CI / release (pull_request) Has been skipped
6b483d0487
ECharts writes text only straight. The page draws these names itself, as SVG
text on paths along the arcs, from the layout ECharts computed: the pie's slices
get their state and count, the rings' wide segments their name. Narrow segments
keep theirs straight along the radius. Each reads from left to right.

Tests of CI / unit: passed

60 passed, 0 failed, 0 skipped (60 tests, 34.5 s)

Of 6b483d0487, the run, updated by every run.

<!-- ci-report tests: CI-unit --> ### Tests of CI / unit: passed **60 passed, 0 failed, 0 skipped** (60 tests, 34.5 s) <sub>Of 6b483d0487, [the run](https://git.ciepiela.org/dawid/checkmk-bi-charts/actions/runs/10), updated by every run.</sub>
dawid merged commit 729fd2d755 into main 2026-11-19 14:44:58 +00:00
dawid deleted branch arc-labels 2026-11-19 14:44:58 +00:00

Tests of CI / integration (Checkmk 2.4): passed

15 passed, 0 failed, 0 skipped (15 tests, 255.9 s)

Of 6b483d0487, the run, updated by every run.

<!-- ci-report tests: CI-integration-Checkmk-2.4- --> ### Tests of CI / integration (Checkmk 2.4): passed **15 passed, 0 failed, 0 skipped** (15 tests, 255.9 s) <sub>Of 6b483d0487, [the run](https://git.ciepiela.org/dawid/checkmk-bi-charts/actions/runs/10), updated by every run.</sub>

Tests of CI / integration (Checkmk 2.5): passed

15 passed, 0 failed, 0 skipped (15 tests, 262.9 s)

Of 6b483d0487, the run, updated by every run.

<!-- ci-report tests: CI-integration-Checkmk-2.5- --> ### Tests of CI / integration (Checkmk 2.5): passed **15 passed, 0 failed, 0 skipped** (15 tests, 262.9 s) <sub>Of 6b483d0487, [the run](https://git.ciepiela.org/dawid/checkmk-bi-charts/actions/runs/10), updated by every run.</sub>

Tests of CI / integration (update 2.4 to 2.5): passed

6 passed, 0 failed, 0 skipped (6 tests, 410.4 s)

Of 6b483d0487, the run, updated by every run.

<!-- ci-report tests: CI-integration-update-2.4-to-2.5- --> ### Tests of CI / integration (update 2.4 to 2.5): passed **6 passed, 0 failed, 0 skipped** (6 tests, 410.4 s) <sub>Of 6b483d0487, [the run](https://git.ciepiela.org/dawid/checkmk-bi-charts/actions/runs/10), updated by every run.</sub>
Sign in to join this conversation.
No description provided.