Commits

Anonymous committed 50c2289

templates for template tags refactoring

Comments (0)

Files changed (6)

mustachebox/templates/mustachebox/columnchart.html

 
   </body>
 </html>
-

mustachebox/templates/mustachebox/pie_chart.html

     <script type="text/javascript"
     src="https://www.google.com/jsapi"></script>
 <script type="text/javascript">
-      var piedata = {% autoescape off %}{{object.data}}{% endautoescape %}
-      var chart = google.visualization.PieChart
+  var piedata = {% autoescape off %}{{object.data}}{% endautoescape %}
+  var chart = google.visualization.PieChart
 </script>
     <script type="text/javascript" src="{{STATIC_URL}}js/pie_chart.js"></script>
   </head>

mustachebox/templates/mustachebox/tags/area.html

 <script type="text/javascript"
     src="https://www.google.com/jsapi"></script>
 <script type="text/javascript">
-      var data = {% autoescape off %}{{object.data}}{% endautoescape %}
+  var data = {% autoescape off %}{{object.data}}{% endautoescape %}
+  var chart = google.visualization.AreaChart
 </script>
-    <script type="text/javascript" src="{{STATIC_URL}}js/area.js"></script>
-
-<div id="chart_div" style="width: 300px; height: 200px;">
+<script type="text/javascript" src="{{STATIC_URL}}js/time_serie.js"></script>
+<script type="text/javascript" src="{{STATIC_URL}}js/area.js"></script>
+<div id="area_chart_div" style="width: 300px; height: 200px;">
 </div>

mustachebox/templates/mustachebox/tags/barchart.html

     <script type="text/javascript"
     src="https://www.google.com/jsapi"></script>
 <script type="text/javascript">
-      var data = {% autoescape off %}{{object.data}}{% endautoescape %}
+  var data = {% autoescape off %}{{object.data}}{% endautoescape %}
+  var chart = google.visualization.BarChart;
 </script>
-    <script type="text/javascript" src="{{STATIC_URL}}js/time_serie.js"></script>
-    <script type="text/javascript"
-    src="{{STATIC_URL}}js/barchart.js"></script>
-        <div id="barchart_div" style="width: 300px; height: 300px;"></div>
+<script type="text/javascript" src="{{STATIC_URL}}js/time_serie.js"></script>
+<script type="text/javascript"
+        src="{{STATIC_URL}}js/barchart.js">
+</script>
+<div id="barchart_div" style="width: 300px; height: 300px;"></div>

mustachebox/templates/mustachebox/tags/columnchart.html

     <script type="text/javascript"
     src="https://www.google.com/jsapi"></script>
 <script type="text/javascript">
-      var data = {% autoescape off %}{{object.data}}{% endautoescape %}
+  var data = {% autoescape off %}{{object.data}}{% endautoescape %}
+  var chart = google.visualization.ColumnChart
 </script>
-    <script type="text/javascript" src="{{STATIC_URL}}js/time_serie.js"></script>
-    <script type="text/javascript"
-    src="{{STATIC_URL}}js/columnchart.js"></script>
-            <div id="columnchart_div" style="width: 300px; height: 300px;"></div>
+<script type="text/javascript" src="{{STATIC_URL}}js/time_serie.js"></script>
+<script type="text/javascript"
+        src="{{STATIC_URL}}js/columnchart.js">
+</script>
+<div id="columnchart_div" style="width: 300px; height: 300px;"></div>

mustachebox/templates/mustachebox/tags/pie_chart.html

 <script type="text/javascript"
     src="https://www.google.com/jsapi"></script>
 <script type="text/javascript">
-      var piedata = {% autoescape off %}{{object.data}}{% endautoescape %}
+  var piedata = {% autoescape off %}{{object.data}}{% endautoescape %}
+  var chart = google.visualization.PieChart
 </script>
 <script type="text/javascript" src="{{STATIC_URL}}js/pie_chart.js"></script>