--- a/ckanext/ga_report/templates/ga_report/ga_util.html +++ b/ckanext/ga_report/templates/ga_report/ga_util.html @@ -28,6 +28,20 @@ </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> + <div id="legend_$id" class="rickshaw_legend"></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">