{% set seriesColorCount = constant("Piwik\\Plugins\\CoreVisualizations\\Visualizations\\JqplotGraph\\Evolution::SERIES_COLOR_COUNT") %}
<div class="rowevolution">
    <div class="popover-title">{{ popoverTitle | raw }}</div>
    <div class="graph">
        {{ graph|raw }}
    </div>
    <div class="metrics-container">
        <h2>{{ availableMetricsText|raw }}</h2>

        <div class="rowevolution-documentation">
            {{ 'RowEvolution_Documentation'|translate }}
        </div>
        <table class="metrics" border="0" cellpadding="0" cellspacing="0" data-thing="{{ seriesColorCount }}">
            {% for i, metric in metrics %}
                <tr data-i="{{ i }}">
                    <td class="sparkline">
                        {{ metric.sparkline|raw }}
                    </td>
                    <td class="text">
                        <span class="evolution-graph-colors" data-name="series{{ (i % seriesColorCount) + 1 }}">
                            {{- metric.label|raw -}}
                        </span>
                        {% if metric.details %}:
                            <span class="details" title="{{ metric.minmax }}">{{ metric.details|raw }}</span>
                        {% endif %}
                    </td>
                </tr>
            {% endfor %}
        </table>
    </div>
    <div class="compare-container">
        <h2>{{ 'RowEvolution_CompareRows'|translate }}</h2>

        <div class="rowevolution-documentation">
            {{ 'RowEvolution_CompareDocumentation'|translate|raw }}
        </div>
        <a href="#" class="rowevolution-startmulti">&raquo; {{ 'RowEvolution_PickARow'|translate }}</a>
    </div>
</div>
