Complete Diagram Guide
by Peta Team
Complete Diagram Guide
Flowchart Diagrams
Flowcharts are the most versatile diagram type in Peta. They're perfect for visualizing processes, workflows, decision trees, and algorithmic logic.
Basic Syntax
The fundamental syntax for flowcharts uses nodes connected by arrows:
This creates a linear flow from left to right.
Node Syntax
Creating Nodes
Nodes are created simply by typing their name. The renderer automatically:
- Calculates optimal positioning
- Draws rounded rectangles for nodes
- Adds appropriate spacing
Naming Conventions
- Use descriptive names
- Spaces are allowed in node names
- Keep names concise
- Use consistent capitalization
Arrow Syntax
Basic Arrows
Use `->` to connect nodes:
Multiple Connections
A node can connect to multiple nodes:
Branching
Decision Points
Create decision points by branching from a single node:
Labelled Branches
Add labels to branches using the arrow label syntax:
The text after the arrow becomes the branch label.
Complex Flows
Sequential Flow
Chain multiple nodes together:
Parallel Processing
Show parallel processes:
Feedback Loops
Create loops and iterations:
Advanced Features
Complex Workflows
Combine multiple concepts:
Practical Examples
User Authentication
CI/CD Pipeline
Order Processing
Tips and Best Practices
- Keep it simple: Avoid overly complex flows
- Use clear labels: Make node names descriptive
- Logical flow: Arrange nodes in logical order
- Consistent direction: Generally left-to-right or top-to-bottom
- Balance branches: Try to keep branches balanced
Common Patterns
Decision Tree
Error Handling
Next Steps
Now that you've mastered flowcharts, let's move on to Gantt charts for timeline visualization in the next chapter.