Skip to content

Commit

Permalink
Change function name to indicate it relies on d3
Browse files Browse the repository at this point in the history
  • Loading branch information
henare committed Oct 19, 2016
1 parent a28bd0e commit db2dd72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/time_series.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function timeSeries(selector, data, title, metric_name) {
function d3TimeSeries(selector, data, title, metric_name) {

// Add the title
var wrapper_element = document.querySelectorAll(selector)[0];
Expand Down
4 changes: 2 additions & 2 deletions app/views/statistics/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@
<%= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.12/d3.min.js" %>
<%= javascript_include_tag "time_series" %>
<script type="text/javascript">
if (typeof timeSeries == 'function') {
if (typeof d3TimeSeries == 'function') {
d3.json("<%= statistics_url(:format => 'json') %>", function(data) {
timeSeries(
d3TimeSeries(
"#request-hide-events-data",
data["requests"]["hides_by_week"],
"<%= _("Number of request hide events over time") %>",
Expand Down

0 comments on commit db2dd72

Please sign in to comment.