{% extends '@PlatformControlPanel/base.html.twig' %}
{% block header %}
{% embed '@ui/common/headers/new.html.twig' with {
subtitle: 'Widget Stats',
title: (tenant is not empty) ? tenant.name : 'SYSTEM'
} %}
{% block actions %}
{% if tenant is not empty %}
{% include '@ui/common/buttons/default.html.twig' with {
text: 'Back to Tenants',
helper: 'default',
link: path('platform.control_panel.dashboard.tenant.index')
} %}
{% endif %}
{% endblock %}
{% endembed %}
{% include '@PlatformControlPanel/Dashboard/Stats/includes/navbar.html.twig' %}
{% endblock %}
{% block content %}
<div style="background-color: #FFFFFF; height: 500px;">
<canvas id="statsChart"></canvas>
</div>
<script type="text/javascript">
;(function (window, document, $, undefined) {
$(function () {
new Chart(
$('#statsChart'),
{
type: 'bar',
data: {{ data|json_encode|raw }},
options: {
responsive: true,
maintainAspectRatio: false,
tooltips: {
mode: 'index',
intersect: false,
position: 'nearest'
},
hover: {
animationDuration: 0
}
}
}
);
});
})(window, document, jQuery);
</script>
{% endblock %}