openvk/Web/Presenters/templates/Group/Statistics.xml
Mikita Wiśniewski 1b6e45f969
Groups: move Statistics from Edit tab to its' own profile link (#844)
* Groups: move Statistics from Edit tab to its' own profile link

after all, it doesn't have anything to do with changing the groups' admins, removing followers and changing name/description

* Update EditBackdrop.xml

oops
2023-04-30 17:40:06 +03:00

39 lines
1.4 KiB
XML

{extends "../@layout.xml"}
{block title}{$club->getName()} » {_statistics}{/block}
{block header}
<a href="{$club->getURL()}">{$club->getName()}</a> » {_statistics}
{/block}
{block content}
<div>
<h4>Охват</h4>
<p>Этот график отображает охват за последние 7 дней.</p>
<div id="reachChart" style="width: 100%; height: 280px;"></div>
<h4>Просмотры</h4>
<p>Этот график отображает просмотры постов сообщества за последние 7 дней.</p>
<div id="viewsChart" style="width: 100%; height: 280px;"></div>
<style>
.modebar-container {
display: none !important;
}
</style>
{script "js/node_modules/plotly.js-dist/plotly.js"}
<script>
function makePlot(selector, datum) {
Plotly.newPlot(document.querySelector(selector), [datum.total, datum.subs, datum.viral], {
margin: { t: 0 },
layout: { showlegend: true, legend: { xanchor: 'center', x: 0.5, orientation: 'h' } }
});
}
let reach = {$reach};
let views = {$views};
makePlot("#reachChart", reach);
makePlot("#viewsChart", views);
</script>
</div>
{/block}