Implements downloads counts (for dataset resources) and fixes an issue with 'All' records.
[ckanext-ga-report.git] / ckanext / ga_report / templates / ga_report / ga_util.html
blob:a/ckanext/ga_report/templates/ga_report/ga_util.html -> blob:b/ckanext/ga_report/templates/ga_report/ga_util.html
--- a/ckanext/ga_report/templates/ga_report/ga_util.html
+++ b/ckanext/ga_report/templates/ga_report/ga_util.html
@@ -28,6 +28,19 @@
     </tr>
     </py:for>
  </table>
+
+
+<div py:def="rickshaw_graph(items_json,id,mode='line',colorscheme='munin')">
+  <div id="chart_container_$id" class="rickshaw_chart_container">
+    <div id="y_axis_$id" class="rickshaw_y_axis"></div>
+    <div id="chart_$id" class="rickshaw_chart"></div>
+    <script type="text/javascript">
+      $(function() {
+          CKAN.GA_Reports.render_rickshaw('$id', $items_json, '$mode', '$colorscheme');
+      });
+    </script>
+  </div>
+</div>
 
 
 <table py:def="stat_table(items, title='Views')" class="table table-condensed table-bordered table-striped">