--- a/lib/graphs.inc.php +++ b/lib/graphs.inc.php @@ -7,6 +7,7 @@ + '; $includedFlot = true; @@ -23,8 +24,9 @@ $(function () { var d1 = []; + var d2 = []; prepare($query); $query->execute(); if (!$query) { @@ -35,6 +37,18 @@ foreach ($query->fetchAll() as $delta) { echo "d1.push([ ".intval($delta['cnid']).", ".intval($delta['count'])."]); \n"; +}; +$query = 'select cnid, count(*) from (select ("CNID" - MOD("CNID",100)) as cnid from contractnotice where "CNID" < 999999 and "parentCN" is not null) as a group by cnid order by cnid'; +$query = $conn->prepare($query); +$query->execute(); +if (!$query) { + databaseError($conn->errorInfo()); + return Array(); +} + +foreach ($query->fetchAll() as $delta) { + + echo "d2.push([ ".intval($delta['cnid']).", ".intval($delta['count'])."]); \n"; }; ?> @@ -47,10 +61,20 @@ }, bars: { show: true } }, + { + data: d2, +series: { + lines: { show: true }, + points: { show: true } + }, + bars: { show: true } + }, ]; var options = { - +series: { + stack: true, + }, grid: { hoverable: true, clickable: true, labelMargin: 17 }, selection: { mode: "x" } };