Skip to content

Commit

Permalink
allow decimal values to be shown on the peak graph (#1574)
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydpick authored and cantino committed Jul 1, 2016
1 parent 8aef73e commit c3e263d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.show-view.peak-detector-agent,
.show-view.twitter-stream-agent {
.rickshaw_annotation_timeline {
left: 40px;
left: 60px;
width: 700px;
}

Expand All @@ -28,7 +28,7 @@

.chart {
position: relative;
left: 40px;
left: 60px;
overflow: hidden;
width: 700px;
}
Expand Down Expand Up @@ -60,8 +60,8 @@
position: absolute;
top: 0;
bottom: 0;
width: 40px;
width: 60px;
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<script>
$(function() {
var $chart = $(".chart-container.group-<%= index.to_s %>").last();
var data = <%= Utils.jsonify(data.map {|count, time| { :x => time.to_i, :y => count.to_i } }) %>;
var data = <%= Utils.jsonify(data.select {|c, _t| !c.nil? }.map {|count, time| { :x => time.to_i, :y => count.to_f } }) %>;
var peaks = <%= Utils.jsonify((@agent.memory[:peaks] && @agent.memory[:peaks][group_name]) || []) %>;
var name = <%= Utils.jsonify(group_name) %>;

Expand All @@ -30,4 +30,4 @@
<p>
No data has been received.
</p>
<% end %>
<% end %>

0 comments on commit c3e263d

Please sign in to comment.