<!-- extend base layout -->
{% extends "appbuilder/base.html" %}
{% import 'appbuilder/general/lib.html' as lib %}

{% block content %}

<label>{{_('Group by fields') }}:</label>
{% for group_by in group_by_columns %}
        <a href="{{url_for('.chart',period = 'month', group_by=group_by)}}" class="btn btn-sm btn-primary">
        {{label_columns[group_by]}} Month
        </a>
        <a href="{{url_for('.chart',period = 'year', group_by=group_by)}}" class="btn btn-sm btn-primary">
        {{label_columns[group_by]}} Year
        </a>
        
{% endfor %}
<div id="chart" class="col-sm-12 col-lg-12" style="height: {{height}};">
</div>
{{ widgets.get('chart')()|safe }}


{% endblock %}
