Returns `(fillcolor, shape)` for a given node kind.
(kind: &str)
| 549 | |
| 550 | /// Returns `(fillcolor, shape)` for a given node kind. |
| 551 | fn node_style(kind: &str) -> (&'static str, &'static str) { |
| 552 | match Class::from_iri(kind) { |
| 553 | Some(Class::File) => ("#d5f5e3", "box"), |
| 554 | Some(Class::Change) => ("#fadbd8", "note"), |
| 555 | Some(Class::View) => ("#e8daef", "pentagon"), |
| 556 | Some( |
| 557 | Class::Goal |
| 558 | | Class::WorkIntent |
| 559 | | Class::FeatureIntent |
| 560 | | Class::BugIntent |
| 561 | | Class::ReviewIntent, |
| 562 | ) => ("#d1f2eb", "hexagon"), |
| 563 | Some(Class::Memory | Class::Identity) => ("#fef9e7", "box"), |
| 564 | _ => ("#f2f3f4", "box"), |
| 565 | } |
| 566 | } |
| 567 | |
| 568 | /// Build a human-readable label for a node in DOT output. |
| 569 | fn node_label(node: &KgNode) -> String { |