{% extends 'creme_core/bricks/base/base.html' %} {% load i18n creme_bricks reports_tags %} {% load blockjsondata jsonify templatize from creme_core_tags %} {% block brick_extra_class %}reports-graph-brick{% if hide_brick %} is-empty{% endif %}{% endblock %} {% block brick_script %} {% if x %} {% endif %} {% endblock %} {% block brick_header_title %} {% translate "Graph" context "reports-graphs" as title_prefix %}{% templatize '{{title_prefix}} — {{graph}}' as title %} {% brick_header_title title=title icon='graph' %} {% endblock %} {% block brick_header_actions %} {% brick_header_action id='redirect' url=graph.get_absolute_url label=_('View') icon='goto' %} {% brick_header_action id='refresh' label=_('Reload') icon='reload' %} {% endblock %} {% block brick_before_content %} {% with hand=graph.hand %} {% if hand.abscissa_error is not None %}
{% blocktranslate with error=hand.abscissa_error %}Beware: there is an error with the X axis: {{error}}{% endblocktranslate %}
{% endif %} {% with ordinate=hand.ordinate %} {% if ordinate.error is not None %}
{% blocktranslate with error=ordinate.error %}Beware: there is an error with the Y axis: {{error}}{% endblocktranslate %}
{% endif %} {% endwith %} {% endwith %} {% endblock %} {% block brick_content_extra_class %}{% if not x %} is-empty{% endif %}{% endblock %} {% block brick_content %} {% if x %}
{% translate 'Graph' context 'reports-graphs' %} :  Histogram{# Filled by JS #}
{% translate 'Sorting' %} :  Ascending{# Filled by JS #}
{% if object and volatile_column %}
{% translate 'Volatile column' %} :  {{volatile_column}}
{% endif %}
{% for name, chart in report_charts %} {% blockjsondata name=name %}{% reports_chart_jqplot_json graph chart %}{% endblockjsondata %} {% endfor %}
{% elif error %}
{{error}}
{% else %}
{% translate 'No values or graph is not applicable here' %}
{% endif %} {% endblock %}