Skip to content

Commit 5c5d7a9

Browse files
authored
Merge pull request #129 from jongalloway/feature/target-diagram
Add conceptual target diagram support
2 parents dd674e6 + f1b0456 commit 5c5d7a9

76 files changed

Lines changed: 1445 additions & 236 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,7 @@ Rule of thumb: if the diagram is already easy to describe as Mermaid, use Mermai
766766
| Iterative process / feedback loop (3–6 steps) | Conceptual DSL | `diagram: cycle\nsteps:\n - Plan\n - Build\n - Measure\n - Learn` |
767767
| Sequential stage process (slide-style chevrons) | Conceptual DSL | `diagram: chevrons\nsteps:\n - Discover\n - Build\n - Launch\n - Learn` |
768768
| Central concept with surrounding pillars / capabilities (3–8 items) | Conceptual DSL | `diagram: radial\ncenter: Platform\nitems:\n - Security\n - Reliability\n - Observability` |
769+
| Concentric strategy / segmentation target | Conceptual DSL | `diagram: target\ncenter: Launch\nrings:\n - Inner ring: Pricing and messaging\n - Outer ring: Audience reach` |
769770
| Visual step-by-step journey / snake timeline (3+ steps) | Conceptual DSL | `diagram: snake\ntitle: Journey\nsteps:\n - Start: Begin here\n - Middle: Keep going\n - End: Arrive` |
770771

771772
Planned conceptual additions are aimed at presentation-native graphics that Mermaid does not cover idiomatically, such as tree hierarchies / org charts.
@@ -869,6 +870,22 @@ items:
869870

870871
Supported: 3–8 items. Items are placed evenly around the center at equal angles, starting at the top (12 o'clock).
871872

873+
#### target
874+
875+
Concentric target layout for strategy, segmentation, launch focus, or maturity narratives. One central outcome is surrounded by 2–5 rings, with matching callout cards stacked to the right.
876+
877+
```text
878+
diagram: target
879+
title: Launch Focus
880+
center: Launch
881+
rings:
882+
- Inner ring: Pricing, messaging, and activation readiness
883+
- Middle ring: Programs and execution
884+
- Outer ring: Audience reach and partner signal
885+
```
886+
887+
Rings are listed from outermost to innermost. The callout cards preserve that order from top to bottom.
888+
872889
#### snake
873890

874891
Snake timeline layout for journeys, processes, and step-by-step narratives. Steps are rendered as large circles connected by a weaving semicircular path that alternates above and below. Each step supports an optional icon and description.
@@ -914,6 +931,8 @@ Parsers produce a syntax-independent `Diagram` (nodes, edges, groups, labels, la
914931

915932
See [`doc/prd.md`](doc/prd.md) for the full plan. Short version: more Mermaid diagram types, more conceptual layouts, theme packs, eventually D2 and DOT parsers.
916933

934+
For analysis of which SmartArt-style conceptual diagrams are most worth adding next, see [`doc/smartart-analysis.md`](doc/smartart-analysis.md).
935+
917936
## Contributing
918937

919938
See [CONTRIBUTING.md](CONTRIBUTING.md).

doc/PackageReadme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ dnx DiagramForge.Tool diagram.mmd --theme dracula --transparent -o overlay.svg
5959
## Supported today
6060

6161
- Mermaid subset: flowchart, block, sequence, state, mindmap, timeline, venn, architecture, and xychart
62-
- Conceptual DSL: matrix, pyramid, cycle, pillars, funnel, and radial
62+
- Conceptual DSL: matrix, pyramid, cycle, pillars, funnel, radial, target, chevrons, snake, tablist, tree, and more
6363
- Theme presets, theme JSON files, palette overrides, and frontmatter styling
6464

6565
DiagramForge intentionally implements a focused Mermaid subset rather than full Mermaid.js parity.

doc/smartart-analysis.md

Lines changed: 308 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,308 @@
1+
# SmartArt Analysis for Future Conceptual Diagrams
2+
3+
This document reviews the Microsoft SmartArt catalog and recommends which presentation-native diagram types DiagramForge should add next.
4+
5+
Reference source:
6+
7+
- Microsoft Support: [All SmartArt graphics, described](https://support.microsoft.com/en-us/office/all-smartart-graphics-described-cf1a453b-de4a-4217-8da0-1aff97bb32cd)
8+
9+
## Purpose
10+
11+
DiagramForge should not chase SmartArt parity. The product direction in [prd.md](prd.md) is to support modern equivalents for slide-friendly conceptual diagrams, not to reproduce Office layouts exactly.
12+
13+
That means the best additions are the ones that:
14+
15+
- solve common presentation problems,
16+
- are awkward to express cleanly in Mermaid,
17+
- fit the existing parser -> semantic model -> layout -> SVG pipeline,
18+
- and can reuse current conceptual architecture rather than introducing a new rendering system.
19+
20+
## Current Coverage
21+
22+
DiagramForge already covers a meaningful part of the high-value SmartArt space through its conceptual DSL and Mermaid support.
23+
24+
Conceptual diagram types currently implemented in the repository:
25+
26+
- matrix
27+
- pyramid
28+
- cycle
29+
- funnel
30+
- pillars
31+
- radial
32+
- target
33+
- chevrons
34+
- tree / org-chart style tree
35+
- snake timeline
36+
- tablist
37+
38+
That is important because several SmartArt categories are already effectively represented:
39+
40+
- Process: chevrons, funnel, snake timeline, Mermaid timeline
41+
- Cycle: cycle, radial
42+
- Hierarchy: tree / org chart style tree
43+
- Matrix: 2x2 matrix
44+
- Pyramid: pyramid
45+
- List: tablist and several existing text-first conceptual layouts
46+
47+
## Selection Criteria
48+
49+
The SmartArt catalog is broad, but much of it falls into one of three buckets:
50+
51+
1. Useful and presentation-native
52+
2. Already covered well enough by Mermaid or existing DiagramForge concepts
53+
3. Office-specific or picture-heavy layouts that do not align with DiagramForge's text-to-SVG model
54+
55+
The recommendations below favor category 1.
56+
57+
## Recommended Additions
58+
59+
### 1. Target / Concentric Target Diagrams
60+
61+
Status: implemented after this analysis.
62+
63+
Highest-value next addition.
64+
65+
Relevant SmartArt examples:
66+
67+
- Basic Target
68+
- Nested Target
69+
- Target List
70+
71+
Why it is valuable:
72+
73+
- Common in strategy, planning, segmentation, maturity, priority, and audience slides
74+
- Strong visual payoff in presentations
75+
- Not idiomatic in Mermaid
76+
- Distinct from current matrix, radial, and pyramid layouts
77+
78+
Why it fits DiagramForge:
79+
80+
- Can be implemented as a specialized conceptual layout with a small SVG extension
81+
- Reuses the existing node model and metadata-driven rendering approach
82+
- Works well with current theming, labels, and icon support patterns
83+
84+
Suggested scope:
85+
86+
- Concentric rings with 3-6 levels
87+
- Optional center label
88+
- Optional side labels or callouts for each ring
89+
90+
### 2. Matrix Variants
91+
92+
High-value, low-risk extension of what already exists.
93+
94+
Relevant SmartArt examples:
95+
96+
- Basic Matrix
97+
- Grid Matrix
98+
- Titled Matrix
99+
100+
Why it is valuable:
101+
102+
- Matrix slides are common in prioritization, capability mapping, risk, and portfolio discussions
103+
- The current 2x2 matrix is useful but constrained
104+
- Titled and grid variants cover a wider range of real presentation use cases
105+
106+
Why it fits DiagramForge:
107+
108+
- Existing matrix parser and layout provide a direct starting point
109+
- This is an incremental extension rather than a new conceptual family
110+
- The renderer already handles metadata-driven special cases cleanly
111+
112+
Suggested scope:
113+
114+
- Titled matrix with a center title and four surrounding quadrants
115+
- 3x3 grid matrix for placement along two axes
116+
- Preserve the current 2x2 form as the default
117+
118+
### 3. Richer Hierarchy / Org-Chart Variants
119+
120+
Hierarchy remains one of the most useful SmartArt families in business presentations.
121+
122+
Relevant SmartArt examples:
123+
124+
- Hierarchy
125+
- Organization Chart
126+
- Horizontal Hierarchy
127+
- Labeled Hierarchy
128+
- Table Hierarchy
129+
130+
Why it is valuable:
131+
132+
- Org charts, responsibility trees, capability maps, and decomposition views are common slide artifacts
133+
- Mermaid mindmap and flowchart are often serviceable, but formal presentation hierarchies benefit from dedicated layout rules
134+
135+
Why it fits DiagramForge:
136+
137+
- The repository already has tree parsing and an org-chart style preset
138+
- The next value is in variants, not another generic hierarchy type
139+
- Horizontal, labeled, or assistant-aware hierarchy behaviors can extend the current tree implementation
140+
141+
Suggested scope:
142+
143+
- Horizontal hierarchy variant
144+
- Labeled hierarchy variant
145+
- Org-chart-specific assistant or hanging branch options
146+
147+
### 4. Compare / Opposing-Ideas Layouts
148+
149+
Useful for decision, tradeoff, and pros-versus-cons slides.
150+
151+
Relevant SmartArt examples:
152+
153+
- Balance
154+
- Opposing Ideas
155+
- Plus and Minus
156+
- Counterbalance Arrows
157+
- Opposing Arrows
158+
159+
Why it is valuable:
160+
161+
- These are common executive and product-review slides
162+
- They express comparison more clearly than a generic flowchart
163+
- The visual form is more important than graph semantics
164+
165+
Why it fits DiagramForge:
166+
167+
- It is presentation-native and text-first
168+
- It can likely be implemented with standard nodes plus specialized placement
169+
- It complements current conceptual types without overlapping Mermaid too much
170+
171+
Suggested scope:
172+
173+
- Two-sided comparison layout
174+
- Optional central thesis / pivot / decision node
175+
- Support for grouped bullets or sub-points on each side
176+
177+
### 5. Radial Variants
178+
179+
Worth doing after target and matrix expansion.
180+
181+
Relevant SmartArt examples:
182+
183+
- Radial List
184+
- Radial Cluster
185+
- Converging Radial
186+
- Diverging Radial
187+
- Basic Radial
188+
189+
Why it is valuable:
190+
191+
- Hub-and-spoke is already useful, but more expressive radial forms would broaden the design language for strategy and architecture slides
192+
- This supports narratives like inputs to a center, outputs from a center, or clustered concepts around a theme
193+
194+
Why it fits DiagramForge:
195+
196+
- Existing radial support provides the parser and layout foundation
197+
- Variants can be introduced as alternate layout modes rather than as fully separate infrastructure
198+
199+
Suggested scope:
200+
201+
- `layout: cluster`
202+
- `layout: converging`
203+
- `layout: diverging`
204+
205+
### 6. Pyramid Variants
206+
207+
Useful, but lower priority than the items above.
208+
209+
Relevant SmartArt examples:
210+
211+
- Inverted Pyramid
212+
- Segmented Pyramid
213+
- Pyramid List
214+
215+
Why it is valuable:
216+
217+
- Supports maturity, hierarchy, containment, and emphasis narratives
218+
- Common in strategy and transformation presentations
219+
220+
Why it fits DiagramForge:
221+
222+
- Current pyramid and funnel implementations already cover much of the geometry needed
223+
- Variants are likely incremental and renderer-friendly
224+
225+
Suggested scope:
226+
227+
- inverted pyramid
228+
- segmented pyramid
229+
- optional side labels or captions
230+
231+
## Lower-Priority SmartArt Families
232+
233+
These are less attractive for DiagramForge right now.
234+
235+
### Picture-heavy layouts
236+
237+
Examples:
238+
239+
- Picture Accent List
240+
- Picture Caption List
241+
- Picture Grid
242+
- Picture Organization Chart
243+
244+
Why lower priority:
245+
246+
- DiagramForge is strongest when the source is text-first and theme-driven
247+
- Picture-centric SmartArt depends on image assets and a different authoring model
248+
- These layouts are less reusable in documentation and automation workflows
249+
250+
### SmartArt variants already covered by Mermaid or current diagrams
251+
252+
Examples:
253+
254+
- Venn and overlap diagrams
255+
- Generic process chains
256+
- Timelines and phased roadmaps
257+
- Generic relationship graphs
258+
259+
Why lower priority:
260+
261+
- Mermaid already covers these categories well enough for DiagramForge's current scope
262+
- Adding conceptual duplicates would increase surface area without clear user value
263+
264+
### Decorative Office-specific process shapes
265+
266+
Examples:
267+
268+
- Gear
269+
- Equation
270+
- Pie Process
271+
- Ascending / Descending process variants that mainly restyle the same story
272+
273+
Why lower priority:
274+
275+
- They are more ornamental than foundational
276+
- Many are style variants of shapes already represented by chevrons, funnel, cycle, or timeline concepts
277+
278+
## Recommended Priority Order
279+
280+
If the goal is to add the next few conceptual diagram types with strong product value and good implementation fit, the order should be:
281+
282+
1. Target / concentric target
283+
2. Matrix variants: titled matrix and 3x3 grid matrix
284+
3. Hierarchy / org-chart variants
285+
4. Compare / opposing-ideas layout
286+
5. Radial variants
287+
6. Pyramid variants
288+
289+
## Practical Guidance
290+
291+
The repository already shows the right extension seam for conceptual diagrams:
292+
293+
- add a parser entry for the new diagram type,
294+
- add a conceptual layout handler,
295+
- add only the SVG specialization needed for the final shape,
296+
- cover the work with focused parser tests and snapshot fixtures.
297+
298+
That favors additions like target diagrams and matrix variants, which are mostly specialized layout and rendering work, over more ambitious diagram families that would require new semantic primitives.
299+
300+
## Summary
301+
302+
The best next SmartArt-inspired additions are not the broadest or flashiest categories. They are the presentation-native layouts that:
303+
304+
- appear frequently in modern business and product presentations,
305+
- are clearly better than Mermaid for the same job,
306+
- and can be implemented incrementally within DiagramForge's existing conceptual DSL architecture.
307+
308+
From that perspective, target diagrams, matrix variants, and hierarchy variants are the strongest next investments.

src/DiagramForge/Layout/DefaultLayoutEngine.Conceptual.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ private delegate void ConceptualLayoutHandler(
2626
["radial"] = LayoutRadialDiagram,
2727
["snake"] = LayoutSnakeDiagram,
2828
["tablist"] = LayoutTabListDiagram,
29+
["target"] = LayoutTargetDiagram,
2930
["tree"] = LayoutTreeDiagram,
3031
}.ToFrozenDictionary(StringComparer.OrdinalIgnoreCase);
3132

0 commit comments

Comments
 (0)