1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-21 22:47:43 +00:00
Files
matomo/plugins/CoreHome/templates/getMultiRowEvolutionPopover.twig
Thomas Steur 871c31d096 Changed period in row evolution breaks graph/metric association (#14423)
* Changed period in row evolution breaks graph/metric association

fix #14208

worked for me, also with multi row evolution. Only known issue I found is if requesting eg first yearly row evolution which may have the `users` metric hidden, then switching to `day` period, and then the `users` metric is maybe supposed to become available but didn't. That should be quite edge case though.

* add class whether row is hidden

* Fixing couple regressions visible in ui tests.

* fix build + update comment

* tweak

* test tweak
2019-05-24 14:18:03 -07:00

41 خطوط
1.9 KiB
Twig

{% set seriesColorCount = constant("Piwik\\Plugins\\CoreVisualizations\\Visualizations\\JqplotGraph\\Evolution::SERIES_COLOR_COUNT") %}
<div class="rowevolution multirowevolution">
<div class="popover-title">{{ 'RowEvolution_MultiRowEvolutionTitle'|translate }}</div>
<div class="graph">
{{ graph | raw }}
</div>
<div class="metrics-container">
<h2>{{ availableRecordsText|translate }}</h2>
<table class="metrics" border="0" cellpadding="0" cellspacing="0">
{% for i, metric in metrics %}
<tr {% if metric.hide|default %}class="hiddenByDefault" style="display:none"{% endif %}>
<td class="sparkline">
{{ metric.sparkline|raw }}
</td>
<td class="text">
{% import 'macros.twig' as piwik %}
{{ piwik.logoHtml(metric, "") }}
<span class="evolution-graph-colors" data-name="series{{ (i % seriesColorCount) + 1 }}">
{{- metric.label|raw -}}
</span>
<span class="details" title="{{ metric.minmax }}">{{ metric.details|raw }}</span>
</td>
</tr>
{% endfor %}
</table>
<a href="#" class="rowevolution-startmulti">» {{ 'RowEvolution_PickAnotherRow'|translate }}</a>
</div>
{% if availableMetrics|length > 1 %}
<div class="metric-selectbox">
<h2>{{ 'RowEvolution_AvailableMetrics'|translate }}</h2>
<select name="metric" class="multirowevoltion-metric">
{% for metric, metricName in availableMetrics %}
<option value="{{ metric }}"{% if selectedMetric == metric %} selected="selected"{% endif %}>
{{ metricName }}
</option>
{% endfor %}
</select>
</div>
{% endif %}
</div>