From b0de8833393c4ca1813c70de129508df6a89209c Mon Sep 17 00:00:00 2001 From: Walter Hupfeld Date: Tue, 10 Oct 2023 11:54:57 +0200 Subject: [PATCH] more charts --- statistics/gemeinde_detail.php | 87 ++++++++++++++++++++++++++++++++-- statistics/include.php | 4 +- 2 files changed, 85 insertions(+), 6 deletions(-) diff --git a/statistics/gemeinde_detail.php b/statistics/gemeinde_detail.php index 76e5d47..8667a31 100644 --- a/statistics/gemeinde_detail.php +++ b/statistics/gemeinde_detail.php @@ -106,6 +106,7 @@ Quote pro Fläche /km2 +
@@ -126,7 +127,7 @@ - +

Unfalltyp

@@ -138,6 +139,9 @@ ?>
+
+
+
@@ -152,9 +156,11 @@ ?> +
+
+
- \ No newline at end of file diff --git a/statistics/include.php b/statistics/include.php index 4e0cffb..755c49e 100644 --- a/statistics/include.php +++ b/statistics/include.php @@ -53,10 +53,10 @@ function get_unfallart($numYear,$strLocation){ return $arrResult; } -function get_series($arrData,$arrBezeichnung){ +function get_series($arrData,$arrBezeichnung,$strIndex1,$strIndex2="anz"){ $result="["; foreach ($arrData as $row) { - $result.= "{ name: '".$arrBezeichnung[$row['UKATEGORIE']] ."', y: ".$row['anz']."},"; + $result.= "{ name: '".$arrBezeichnung[$row[$strIndex1]] ."', y: ".$row[$strIndex2]."},"; } $result.="]"; return $result;