scatterchart.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {# This template adds attributes unique
  2. to scatterChart #}
  3. {% extends "content.html" %}
  4. {% block body %}
  5. {% block data %}
  6. {{super()}}
  7. {% endblock data %}
  8. {% block init %}
  9. {{super()}}
  10. {% endblock init %}
  11. {% block rendering_opts %}
  12. {{super()}}
  13. {% endblock rendering_opts %}
  14. {% block axes %}
  15. {{super()}}
  16. {% endblock axes %}
  17. {% if chart.x_axis_format == 'AM_PM' %}
  18. function get_am_pm(d){
  19. if (d > 12) {
  20. d = d - 12; return (String(d) + 'PM');
  21. }
  22. else {
  23. return (String(d) + 'AM');
  24. }
  25. };
  26. {% endif %}
  27. {% block legend %}
  28. {{super()}}
  29. {% endblock legend %}
  30. {% block custoattr %}
  31. {{super()}}
  32. {% endblock custoattr %}
  33. {% block inject %}
  34. chart
  35. .showDistX(true)
  36. .showDistY(true)
  37. .color(d3.scale.category10().range());
  38. {{ super() }}
  39. {% endblock inject %}
  40. {% block extras %}
  41. {{ super () }}
  42. {% endblock extras %}
  43. {% block close %}
  44. {{ super() }}
  45. {% endblock close %}
  46. {% endblock body %}