From: Dalibo Date: Thu, 13 Nov 2014 18:09:35 +0000 (+0100) Subject: Use bar graph for Histogram of query times. X-Git-Tag: v6.3~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bd2350dfdb0ddf927aba6474252988ea1b4e8aa9;p=pgbadger Use bar graph for Histogram of query times. --- diff --git a/pgbadger b/pgbadger index c234635..fef67b8 100755 --- a/pgbadger +++ b/pgbadger @@ -7036,8 +7036,7 @@ sub print_histogram_query_times } else { $histogram_info = qq{$NODATA}; } - - $drawn_graphs{histogram_query_times_graph} = &flotr2_piegraph($graphid++, 'graph_histogram_query_times', 'Histogram of query times', %data); + $drawn_graphs{histogram_query_times_graph} = &flotr2_duration_histograph($graphid++, 'graph_histogram_query_times', 'Queries', \@histogram_query_time, %data); $most_range_value = &comma_numbers($most_range_value) if ($most_range_value); @@ -10493,6 +10492,7 @@ sub flotr2_duration_histograph $data1 =~ s/,$//; $data1 .= "];"; $max += int(($max*25)/100); + my $xmax = @$range + 1; my $dateTracker_lblopts = "[ '0', "; for (my $i = 1; $i <= $#{$range}; $i++) { @@ -10511,7 +10511,7 @@ sub flotr2_duration_histograph xaxis: { mode: "normal", min: 0, - max: 10, + max: $xmax, tickDecimals: 0, noTicks: 20, tickFormatter: function(x) {