{% extends 'svg/scatterplot-inline.jinja' %}
{% block layer scoped %}

        <a class="layer-link" href="#{{ layer['id'] }}-description">

            <g class="layer-line">

                {% for datapoint in layer['points'] %}
                    {% if loop.last %}
                        {# do nothing #}
                    {% else %}
                        {% set next_point = layer['points'][loop.index0 + 1] %}
                        <line x1="{{ datapoint['x'] }}%" y1="{{ datapoint['y'] }}%" x2="{{ next_point['x'] }}%" y2="{{ next_point['y'] }}%" />
                    {% endif %}
                {% endfor %}

            </g>

        </a>

    {{ super() }}

{% endblock %}
