[162] Rearranging ga_reports graphs per ticket feedback. Series are sensibly ordered. Page is restructured.
[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
@@ -36,7 +36,9 @@
     <div id="chart_$id" class="rickshaw_chart"></div>
     <script type="text/javascript">
       $(function() {
-          CKAN.GA_Reports.render_rickshaw('$id', $items_json, '$mode', '$colorscheme');
+          var items = $items_json;
+          if (items.length==0) { return; }
+          CKAN.GA_Reports.render_rickshaw('$id', items, '$mode', '$colorscheme');
       });
     </script>
   </div>