geraniums_renderer.j2 917 B

1234567891011121314151617181920212223242526272829303132333435
  1. digraph G {
  2. rankdir=LR;
  3. center=true;
  4. margin=1;
  5. nodesep=1;
  6. node [fontname="Arial", fontsize=10, shape=box, style=filled, fillcolor=white];
  7. // Geraniums
  8. {% for id, name, flowering in geraniums %}
  9. g{{ id }} [
  10. label="geranium: {{ name }}\n({{ 'flowering' if flowering else 'not flowering' }})",
  11. shape=ellipse,
  12. fillcolor="{{ 'lightpink' if flowering else 'lightgray' }}",
  13. fontcolor=black
  14. ];
  15. {% endfor %}
  16. // Pots
  17. {% for id, name, cracked in pots %}
  18. p{{ id }} [
  19. label="pot: {{ name }}\n({{ 'cracked' if cracked else 'pristine' }})",
  20. shape=box,
  21. fillcolor="{{ 'mistyrose' if cracked else 'lightgreen' }}",
  22. fontcolor=black,
  23. style="filled,bold"
  24. ];
  25. {% endfor %}
  26. // Connections: geranium -> pot
  27. {% for source, target in planted %}
  28. g{{ source }} -> p{{ target }};
  29. {% endfor %}
  30. }