{% extends 'miner/base.html' %}
{% load i18n %}
{% load staticfiles %}
{% load static %}


{% block extra_head %}
    <script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.13/d3.js"></script>
    {# <script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.13/d3.min.js"></script> #}

    {# <script src="{% static "d3/d3.min.js" %}"></script> #}
    {#  <script src="{% static "d3-tip/index.js" %}"></script> #}
    <link rel="stylesheet" href="{% static "miner/css/line-plot.css" %}">
{% endblock %}

{% block content %}
    <div class="row">
        <H1>{{ data.title }}</H1>
        <div id="plot_container" class="graph"></div>
    {% block plot %}
        <script src="{% static "miner/js/plot-util.d3.js" %}"></script>
        <script src="{% static "miner/js/line-plot.d3.js" %}"></script>
        <script> line_plot({{ data.d3data|safe }}, 
                {
                 "plot_container_id": "plot_container",
                 "header": {{ data.header|default:"[]"|default_if_none:"[]"|safe }}
                }); </script>
        </script>
        <pre>{{ data|safe|escape }}</pre>

    {% endblock plot %}

{% endblock content %}