Skip to content

Commit

Permalink
metric name and day start from 0
Browse files Browse the repository at this point in the history
  • Loading branch information
akostadinov committed Apr 24, 2023
1 parent b2830f0 commit 5fb1e03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/lib/pdf/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def traffic_and_users

def graph_key_formatter(usage)
if @period == :day
->(point) { (point % 4).zero? ? sprintf("%02d:00", point.succ) : "" }
->(point) { (point % 4).zero? ? sprintf("%02d:00", point) : "" }
else
since = Time.parse(usage.dig(:period, :since))
granularity = usage.dig(:period, :granularity)
Expand All @@ -148,7 +148,7 @@ def traffic_graph
return unless usage

options = {
graph_title: "Traffic",
graph_title: "Traffic - #{usage.dig(:metric, :name)}",
show_graph_title: true,
key: false,
area_fill: false,
Expand Down

0 comments on commit 5fb1e03

Please sign in to comment.