bulletchart.html 576 B

12345678910111213141516171819202122232425262728293031323334
  1. {# This template adds attributes unique
  2. to bulletChart #}
  3. {% extends 'content.html' %}
  4. {% block body %}
  5. {% block data %}
  6. {{ super () }}
  7. {% endblock data %}
  8. function transformedData(){
  9. return data_bulletchart[0]['values'][0]
  10. }
  11. nv.addGraph(function() {
  12. var chart = nv.models.bulletChart();
  13. d3.select('svg')
  14. .datum(transformedData())
  15. .transition().duration(1000)
  16. .call(chart)
  17. ;
  18. return chart;
  19. });
  20. {% block extras %}
  21. {{ super () }}
  22. {% endblock extras %}
  23. {% endblock body %}