{% load nvd3_tags %}
{% if request.GET.debug %}
{# If &debug=True is added to URL show the page as HTML to enable django-debug-toolbar (if installed) #}
<html><body><pre>
{% endif %}
{% if error %}
alert('{{ graph_title }} error: \n{{ error|escapejs }}');
{% elif values %}
function loadChartScript(){
   d3.selectAll('.nvtooltip').remove();
   {% load_chart chart_type values chart_container extra %}
};
loadChartScript();
{% endif %}
{% if request.GET.debug %}
</pre></body></html>
{% endif %}
