{%- macro chart(content, type, data, labels) -%} {# Documentation: https://chartist.dev/ #} {%- if data -%} {%- set id = ui.util.id() -%} {%- set payload = {"series": data or [], "labels": labels or []} -%}
{%- if dedent -%}
{%- set ns = namespace(skip=none) -%}
{%- for line in content.splitlines() -%}
{%- if ns.skip is none and loop.index < 3 and line -%}
{%- set ns.skip = line|length - line.lstrip(" ")|length -%}
{%- endif -%}
{{ line[ns.skip or 0:] ~ "\n" if line or not loop.first}}
{%- endfor -%}
{%- else -%}
{{ content }}
{%- endif -%}
{%- endmacro %}
{%- macro definition_list(items) -%}