digraph include_graph {
rankdir=LR;
node [shape=rectangle, style=filled, fontname="monospace"]
subgraph cluster_a_zoomed {
label="Zoomed-in items";
graph[style=dotted];
{% for id, group in groups %}
{%- if zoomed is containing(id) %}
subgraph cluster_{{id}} {
label="{{group.name}}";
color="{{group.color}}";
style=filled;
{%- for node in group.nodes %}
{{node.id}} [label="{{node.display_name}}", fillcolor="white"]
{%- endfor %}
}
{%- endif %}
{%- endfor %}
}
subgraph cluster_b_regular {
graph[style=dotted];
{%- for id, group in groups %}
{%- if not zoomed is containing(id) %}
{{id}} [
label=
<
<TABLE BORDER="0">
<TR><TD COLSPAN="2" BGCOLOR="yellow" ALIGN="left">{{group.name}}</TD></TR>
{%- for node in group.nodes %}
{%- if loop.index > 8 %}
<TR><TD WIDTH="20"></TD><TD ALIGN="right">... ({{group.nodes | length}} total items)</TD></TR>
{%- endif -%}
{%- if loop.index > 8 %}
{% break %}
{%- endif -%}
<TR><TD WIDTH="20"></TD><TD ALIGN="left">{{node.display_name}}</TD></TR>
{% endfor %}
</TABLE>
>,
fillcolor="{{group.color}}" ];
{%- endif -%}
{% endfor %}
}
{% for link in links %}
{% if link.from.node_id %} {{ link.from.node_id }} {% else %} {{link.from.group_id}} {% endif -%}
->
{%- if link.to.node_id %} {{ link.to.node_id }} {% else %} {{link.to.group_id}} {% endif -%}
[arrowhead="normal"
{%- if link.color -%};color="{{link.color}}" {%- endif -%}
{%- if link.is_bold -%};style="bold" {%- endif -%}
];
{%- endfor %}
}