{% comment %}
    This is the template for the ChartBlock. It is a simple HTML template that renders a canvas element with the chart data. 
    You will probably want to override this template by creating a new template in your project with the same name and template path.
    The template path is 'wagtailcharts/blocks/chart_block.html'
{% endcomment %}

{% if self.title %}<h3>{{self.title}}</h3>{% endif %}
<canvas 
    id="chart-{{block.id}}"
    data-datasets="{{self.datasets}}"
    data-config="{{self.settings.config}}"
    data-chart-type="{{self.chart_type}}"
    {% if self.callbacks %}data-callback="{{self.callbacks}}"{% endif %}
    aria-label="A chart {% if self.title %} with the title {{self.title}} {%endif%}">
    >
    <p>
        Your browser does not support the canvas element.
        This canvas shows a chart {% if self.title %} with the title {{self.title}} {%endif%}
    </p>
</canvas>