From 698275dd12ffd9f7ac93843a5e3bbd1bcd7b58ba Mon Sep 17 00:00:00 2001 From: Kevin Zink Date: Fri, 30 Sep 2022 13:21:10 +0200 Subject: [PATCH] Update common.inc.php (#14407) Place the Y grid dynamically based on the graph's Y range. The algorithm ensures that you always have a grid, that there are enough but not too many grid lines, and that the grid is metric. That is the grid lines are placed every 1, 2, 5 or 10 units. This parameter will also ensure that you get enough decimals displayed even if your graph goes from 69.998 to 70.001. (contributed by Sasha Mikheev). --- includes/html/graphs/common.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/html/graphs/common.inc.php b/includes/html/graphs/common.inc.php index c6af9a5ae9..66331533dc 100644 --- a/includes/html/graphs/common.inc.php +++ b/includes/html/graphs/common.inc.php @@ -59,7 +59,7 @@ if (isset($_GET['graph_title'])) { } if (! isset($scale_min) && ! isset($scale_max)) { - $rrd_options .= ' --alt-autoscale-max'; + $rrd_options .= ' --alt-autoscale-max --alt-y-grid'; } if (! isset($scale_min) && ! isset($scale_max) && ! isset($norigid)) {