Skip to content

Commit

Permalink
Merge pull request ripienaar#17 from nstielau/graph_target_smoothing
Browse files Browse the repository at this point in the history
Adding graph attribute for 'smoothing', aka Graphite's movingAverage().
  • Loading branch information
ripienaar committed Dec 6, 2011
2 parents 480a872 + 1406bcb commit c4dc212
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/graphite_graph.rb
Expand Up @@ -218,6 +218,7 @@ def url(format = nil, url=true)

graphite_target = "derivative(#{graphite_target})" if target[:derivative]
graphite_target = "scale(#{graphite_target},#{target[:scale]})" if target[:scale]
graphite_target = "movingAverage(#{graphite_target},#{target[:smoothing]})" if target[:smoothing]
graphite_target = "drawAsInfinite(#{graphite_target})" if target[:line]

graphite_target = "color(#{graphite_target},\"#{target[:color]}\")" if target[:color]
Expand Down

0 comments on commit c4dc212

Please sign in to comment.