<?php
require_once '/admin/_svg_linechart.php';
header('Content-Type: image/svg+xml; charset=utf-8');
$labels = ['2025-10-01','2025-10-08','2025-10-15'];
$series = [
['name' => 'avg_total', 'values' => [12.0,13.5,14.2]],
['name' => 'MA(7)', 'values' => [12.0,12.8,13.2]], // optional
];
echo sp_svg_linechart(
$series,
$labels,
[
'title' => 'Eigene Zeitreihe',
'x_label' => 'Tag',
'y_label' => 'Durchschnitt (avg_total)',
'max_x_ticks' => 8,
'y_decimals' => 2,
]
); Für automatische Daten nutze z. B. /admin/report_timeseries_svg_v3.php?slug=KVI11&pid=9103&bucket=day&ma=7 (intern mit sp_svg_linechart()).