{% macro table(rows, has_column_header=false, has_row_header=false) -%}
{% for row in rows %} {% set outer_loop = loop %} {% for item in row %} {% if (outer_loop.first and has_column_header) or (loop.first and has_row_header) %} {% else %} {% endif %} {% endfor %} {% endfor %}
{{ item }}{{ item }}
{%- endmacro %} {% macro modal(header, content, id) -%} {%- endmacro %} {% macro plotly_graph(div_id, json_data, style=None) -%}
{% if style != None %}
{% else %}
{% endif %}
{% if "help" in json_data %}
{{ modal(json_data["layout"]["title"], json_data["help"], div_id+"_help")}}
{% endif %}
{%- endmacro %} {% macro plotly_graphs(graphs, styles=None) -%} {% for div_id, json_data in graphs.items() %} {% if "img" in json_data %} {% elif styles != None %} {{ plotly_graph(div_id, json_data, style=styles.get(div_id)) }} {% else %} {{ plotly_graph(div_id, json_data) }} {% endif %} {% endfor %} {%- endmacro %} {% macro panel(panel_title, panel_id, graphs, styles=None, tables=None, show=False) -%}
{{ plotly_graphs(graphs, styles=styles) }}
{% if tables %}
{% for item in tables %} {{ table(item) }} {% endfor %}
{% endif %}
{%- endmacro %}