* docs: [1.2.x] add a Card API chart reference with a runnable gallery
Add Card-API-Charts.md, a reference for all sixteen Card API chart
helpers in lib/html.php: what each chart is for, its signature, an
example and a screenshot. It covers the rules every helper shares
(escaping, translation, unknown and non-finite samples, severity and
series colours) and how a third-party plugin uses the charts: bundling
card-widgets.css behind a file_exists() gate with a pinned hash, calling
a helper behind function_exists(), or writing the markup directly, as the
supported plugins do. A final section builds an Intropage panel from the
charts, next to the existing panel registration walkthrough.
The example plugin (resources/carddemo.zip) gains charts.php, a gallery
of every example from charts-examples.php, and a second Intropage panel,
Traffic overview. Every code block on the page is that source verbatim,
and the screenshots were taken from it running in Cacti 1.2.x and
develop. Card-API.md, Plugin-Intropage.md and the index link the new page.
Documents Cacti/cacti#9322 and Cacti/cacti#9323.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: TheWitness <thewitness@cacti.net>
* docs: say exactly how the chart helpers draw unknown values
Review follow-up. Trend series skip unknown samples, but elsewhere U,
empty strings and NULL count as 0, and only NAN or INF leave a bullet or
box plot part out; values shown as text are printed as given, so callers
must supply "No data" themselves. The multi-line chart joins across a
skipped sample instead of drawing a break.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: TheWitness <thewitness@cacti.net>
* docs: tell fill percentages apart from the statistic change
Review follow-up: only percentages that fill a chart are clamped to
0-100; the card_stat() $delta is a signed change shown as given.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: TheWitness <thewitness@cacti.net>
---------
Signed-off-by: TheWitness <thewitness@cacti.net>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>