google_analytics_visitors_chart.html 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. {% load i18n %}
  2. {% if module.error %}
  3. <ul>
  4. <li>
  5. {{ module.error }}
  6. </li>
  7. </ul>
  8. {% elif module.children %}
  9. <div class="padding center">
  10. <canvas id="chart_{{ module.model.pk }}" style="width: 100%;">
  11. <div class="chart-fillColor"></div>
  12. <div class="chart-strokeColor"></div>
  13. <div class="chart-pointColor"></div>
  14. <div class="chart-pointHighlightFill"></div>
  15. <div class="chart-scaleGridLineColor"></div>
  16. <div class="chart-scaleLineColor"></div>
  17. <div class="chart-scaleFontColor"></div>
  18. <div class="chart-data">
  19. {% for data in module.children %}
  20. <div class="chart-data-item" data-date="{{ data.0|date:"d/m" }}" data-value="{{ data.1 }}"></div>
  21. {% endfor %}
  22. </div>
  23. </canvas>
  24. <script>jet.jQuery('#chart_{{ module.model.pk }}').googleAnalyticsChart();</script>
  25. </div>
  26. {% else %}
  27. <ul>
  28. <li>
  29. {% trans "Nothing to show" %}
  30. </li>
  31. </ul>
  32. {% endif %}