{# Charts Component Template - Reusable chart components for the dashboard #} {# Macro for rendering a trend chart container #} {% macro trend_chart(chart_id, title="", height="300px") %}
{% if title %}

{{ title }}

{% endif %}
{% endmacro %} {# Macro for rendering a bar chart container #} {% macro bar_chart(chart_id, title="", height="300px") %}
{% if title %}

{{ title }}

{% endif %}
{% endmacro %} {# Macro for rendering a doughnut/pie chart container #} {% macro pie_chart(chart_id, title="", size="200px") %}
{% if title %}

{{ title }}

{% endif %}
{% endmacro %} {# Macro for rendering a metric card with optional mini chart #} {% macro metric_card(label, value, change=None, change_type="neutral", chart_id=None) %}

{{ label }}

{{ value }}

{% if change is not none %}

{% if change > 0 %}+{% endif %}{{ change }}%

{% endif %}
{% if chart_id %}
{% endif %}
{% endmacro %} {# JavaScript for chart initialization #} {% macro chart_scripts() %} {% endmacro %}