Mermaid syntax

Mermaid Quadrant Chart Tutorial

Quadrant charts place items across two dimensions. They are useful for prioritization, positioning, and trade-off discussions.

Declaration
quadrantChart
Examples

1 starter pattern

Checks

5 production checks

Quick start

Code and rendered output side by side.

quadrantChart
  title Feature priority
  x-axis Low effort --> High effort
  y-axis Low impact --> High impact
  quadrant-1 Strategic bets
  quadrant-2 Quick wins
  quadrant-3 Fill-ins
  quadrant-4 Time sinks
  Search: [0.25, 0.82]
  Audit log: [0.72, 0.68]
Enter Mermaid code to see preview

What You Will Learn

How to recognize when Quadrant Chart is the right Mermaid diagram, write the opening declaration, and shape a readable first version.

Best Fit

Feature prioritization, Market positioning, Risk analysis.

Start Here

Copy the starter example, replace labels with your domain language, then simplify anything that does not help the reader.

Syntax Basics

Start with the diagram declaration, then add the smallest set of labels, relationships, and annotations needed to communicate the idea.

  • Use quadrantChart as the declaration.
  • Set x-axis and y-axis labels.
  • Name each quadrant.
  • Place items with coordinate pairs.

Read Mermaid Like A Picture

If you are new to Mermaid, do not try to memorize every keyword. Read the code as drawing instructions: first choose the diagram type, then identify the labels, then follow the connections.

Start with the rendered picture first. Then scan the code and ask: which line created this label, connector, section, or value?

Read the first line first

quadrantChart

The first line chooses the diagram family. If it says quadrantChart, every line below follows the rules for a Mermaid Quadrant Chart.

Look for visible labels

[Label], "Label", title, section

Labels are the words readers see in the final diagram. Good labels are short, concrete, and written in the language of the page.

Find the relationships

-->, ->>, :, ||--o{

Connectors, arrows, colons, and relationship markers explain how items interact, move, depend on each other, or belong together.

Use indentation as hierarchy

child line

Indented lines usually belong to the line above them. This matters for sections, mindmaps, trees, tasks, and grouped structures.

Official Documentation Coverage

The Mermaid documentation for Quadrant Chart covers the following syntax areas. This tutorial condenses those topics into practical guidance for day-to-day documentation.

Title

Title is part of the official Mermaid Quadrant Chart syntax surface. Add it when the starter example needs more precision for production documentation.

x-axis labels

Use x-axis labels to make the scale, direction, and meaning of the quadrant chart explicit. Clear axes reduce the chance that readers interpret values or positions differently.

y-axis labels

Use y-axis labels to make the scale, direction, and meaning of the quadrant chart explicit. Clear axes reduce the chance that readers interpret values or positions differently.

Quadrant labels

Quadrant labels is part of the official Mermaid Quadrant Chart syntax surface. Add it when the starter example needs more precision for production documentation.

Points

Points is part of the official Mermaid Quadrant Chart syntax surface. Add it when the starter example needs more precision for production documentation.

Chart configuration

Use Chart configuration after the diagram communicates the right structure. Styling should improve scanning and emphasis without hiding the underlying Mermaid syntax.

Theme variables

Use Theme variables after the diagram communicates the right structure. Styling should improve scanning and emphasis without hiding the underlying Mermaid syntax.

Point styling

Point styling is part of the official Mermaid Quadrant Chart syntax surface. Add it when the starter example needs more precision for production documentation.

How This Tutorial Uses The Official Docs

Mermaid syntax evolves, so the official page remains the primary reference. This tutorial turns that reference material into an authoring workflow, review checklist, and production guidance.

Start with the official grammar

The official Mermaid Quadrant Chart page is the source of truth for syntax changes. Use this tutorial to choose the right authoring pattern, then confirm exact keywords and edge cases in the official reference.

Prioritize the core sections

For the first pass, focus on Title, x-axis labels, y-axis labels, Quadrant labels. These sections usually explain the minimum structure required for a valid Quadrant Chart.

Add advanced syntax only when it earns its space

Treat Points, Chart configuration, Theme variables, Point styling as optional layers. They are valuable when the diagram needs precision, but they should not make the first version harder to read.

Syntax Reference Map

Use this map as a practical reading order for the official syntax page. It separates the first concepts to learn from the advanced details that are better added after the diagram already communicates the right idea.

Phase
How to use it
Start
Title

Title is part of the official Mermaid Quadrant Chart syntax surface. Add it when the starter example needs more precision for production documentation.

Does this title detail make the quadrant chart easier to understand or maintain?

Start
x-axis labels

Use x-axis labels to make the scale, direction, and meaning of the quadrant chart explicit. Clear axes reduce the chance that readers interpret values or positions differently.

Does this x-axis labels detail make the quadrant chart easier to understand or maintain?

Refine
y-axis labels

Use y-axis labels to make the scale, direction, and meaning of the quadrant chart explicit. Clear axes reduce the chance that readers interpret values or positions differently.

Does this y-axis labels detail make the quadrant chart easier to understand or maintain?

Refine
Quadrant labels

Quadrant labels is part of the official Mermaid Quadrant Chart syntax surface. Add it when the starter example needs more precision for production documentation.

Does this quadrant labels detail make the quadrant chart easier to understand or maintain?

Refine
Points

Points is part of the official Mermaid Quadrant Chart syntax surface. Add it when the starter example needs more precision for production documentation.

Does this points detail make the quadrant chart easier to understand or maintain?

Polish
Chart configuration

Use Chart configuration after the diagram communicates the right structure. Styling should improve scanning and emphasis without hiding the underlying Mermaid syntax.

Does this chart configuration detail make the quadrant chart easier to understand or maintain?

Polish
Theme variables

Use Theme variables after the diagram communicates the right structure. Styling should improve scanning and emphasis without hiding the underlying Mermaid syntax.

Does this theme variables detail make the quadrant chart easier to understand or maintain?

Polish
Point styling

Point styling is part of the official Mermaid Quadrant Chart syntax surface. Add it when the starter example needs more precision for production documentation.

Does this point styling detail make the quadrant chart easier to understand or maintain?

How To Study The Official Syntax

The official Mermaid page is broad because it documents the full parser surface. For a working tutorial, read it in passes instead of trying to memorize every option at once.

Step 1

Skim the official Quadrant Chart documentation once to understand the full syntax surface before copying examples into production docs.

Step 2

Focus first on Title, x-axis labels, y-axis labels, Quadrant labels, Points because these topics usually explain the core authoring model.

Step 3

After the first diagram renders, revisit the official styling, configuration, and advanced sections only when the diagram needs that extra precision.

Authoring Workflow

This workflow turns the official syntax reference into a repeatable writing process for docs, specs, and product pages.

Step 1

Frame the reader question

Before writing syntax, decide what question the Quadrant Chart should answer. Good diagrams usually answer one question clearly instead of answering several partially.

Step 2

Draft the smallest valid diagram

Start with the declaration for quadrantChart, add only the required elements, and render it before introducing advanced styling or configuration.

Step 3

Add semantic labels

Replace placeholder names with business or system language that readers already know. Labels should reduce explanation work.

Step 4

Review for maintenance

Remove details that are likely to drift quickly. If a value, date, or dependency changes often, explain who owns the update.

Quick Syntax Cheat Sheet

Use this compact reference when you already know the goal and need to write a valid Mermaid Quadrant Chart quickly.

Declaration
quadrantChart

Start the code block with quadrantChart so Mermaid selects the Quadrant Chart renderer.

Core content
Use quadrantChart as the declaration.

Add the smallest number of statements that express the main idea before adding visual polish.

Connections
Connect the meaningful elements

Use connections only where they explain ownership, sequence, flow, dependency, or hierarchy.

Advanced topic
Title

Use official syntax topics as optional layers, not as requirements for every diagram.

Practice Prompts

Use these prompts after reading the official syntax sections. They force the diagram to stay practical instead of becoming a syntax inventory.

Exercise 1

Create a Quadrant Chart for feature prioritization using no more than eight visible elements.

Exercise 2

Rewrite the starter example with labels from your own product or engineering domain, then remove any line that does not change the reader's understanding.

Exercise 3

Add one official syntax feature from Title, x-axis labels, y-axis labels and explain why that feature makes the diagram clearer.

Exercise 4

Compare the result with xy-chart and radar and write one sentence explaining why Quadrant Chart is still the better fit.

Examples

Each example shows the Mermaid code next to the rendered result, so you can see exactly how syntax becomes a diagram.

Prioritization Matrix

A feature planning matrix by effort and impact.

Edit this example
Mermaid code
quadrantChart
  title Feature priority
  x-axis Low effort --> High effort
  y-axis Low impact --> High impact
  quadrant-1 Strategic bets
  quadrant-2 Quick wins
  quadrant-3 Fill-ins
  quadrant-4 Time sinks
  Search: [0.25, 0.82]
  Audit log: [0.72, 0.68]
Rendered result
Enter Mermaid code to see preview

Example Walkthrough

Read Mermaid examples from top to bottom. The first meaningful line usually selects the diagram parser; the following lines add labels, relationships, values, states, or layout hints.

quadrantChart

This starts the diagram. It tells Mermaid: render everything below as a Quadrant Chart.

title Feature priority

This adds the diagram title. It gives readers context before they inspect the details.

x-axis Low effort --> High effort

This adds a visible connection, message, transition, relationship, value, or task. It is usually the main meaning of the diagram.

y-axis Low impact --> High impact

This adds a visible connection, message, transition, relationship, value, or task. It is usually the main meaning of the diagram.

quadrant-1 Strategic bets

The indentation means this line belongs under the previous parent, section, group, or topic.

quadrant-2 Quick wins

The indentation means this line belongs under the previous parent, section, group, or topic.

quadrant-3 Fill-ins

The indentation means this line belongs under the previous parent, section, group, or topic.

quadrant-4 Time sinks

The indentation means this line belongs under the previous parent, section, group, or topic.

When To Use Quadrant Chart

Feature prioritization
Market positioning
Risk analysis
Decision workshops

Diagram Choice Guide

A strong Mermaid tutorial should also explain when not to use the diagram type. Use this guide before adding a Quadrant Chart to a public page or technical design document.

Use this diagram when

Quadrant Chart works best for feature prioritization, market positioning, risk analysis. It should make the reader's next decision easier, not merely decorate the page.

Choose a different diagram when

Your main question is better answered by another structure, such as xy-chart, radar, flowchart. For example, use a sequence diagram for message order and a flowchart for branching process logic.

Keep it maintainable by

Keeping the first version small, naming every important element with business language, and linking back to the official Mermaid syntax page when advanced syntax is required.

Production Checklist

Before publishing a Mermaid Quadrant Chart, run through this checklist so the diagram remains useful after the immediate conversation is over.

Confirm that Quadrant Chart is the right diagram type for the problem.
Start from the smallest example that communicates the idea clearly.
Use consistent names for nodes, actors, states, or data labels.
Check the diagram in the Mermaid editor before publishing.
Add surrounding text that explains assumptions, scale, or business context.

Production Review Questions

Before shipping the diagram in public docs, compare it against the official syntax page and then ask whether each line helps the reader make a better decision.

Does the first line clearly select the Mermaid Quadrant Chart renderer with quadrantChart?
Are names and labels from the Title area short, stable, and meaningful to the target reader?
Do the relationships, transitions, values, or hierarchy show real meaning instead of visual decoration?
Could a teammate update this diagram next month without rereading the whole surrounding document?

Troubleshooting

Most Mermaid issues come from an incorrect declaration, a syntax feature used before the base diagram works, or a diagram that is trying to communicate too many ideas at once.

The diagram does not render

Check that the first line is the correct declaration for Quadrant Chart: quadrantChart. Then remove advanced lines until the smallest version renders.

The diagram renders but is hard to read

Shorten labels, reduce the number of visible items, and split separate ideas into separate diagrams.

The meaning is ambiguous

Add edge labels, relationship names, axis labels, or surrounding explanatory text so readers know what the diagram is proving.

The diagram becomes stale

Prefer stable concepts over volatile implementation details, and add ownership notes when the diagram documents a changing system.

Publishing Notes

For SEO and long-term documentation quality, keep the Mermaid code close to the explanation. Search engines can understand the surrounding text, while engineers can copy the exact syntax into their own editor.

If the diagram is used in a product page, add a short caption that states what decision the diagram supports. If it is used in internal docs, add ownership and update expectations so the diagram does not become stale after the system changes.

Best Practices

  • -Name axes with clear opposites.
  • -Explain what high and low mean.
  • -Keep item count readable.
  • -Use quadrant names that guide decisions.

Common Mistakes

  • -Using vague axes.
  • -Placing too many items in one quadrant.
  • -Treating approximate coordinates as exact data.

Choosing Related Diagram Types

If Quadrant Chart does not quite match your communication goal, compare it with these nearby Mermaid diagram types.

FAQ

Is Mermaid Quadrant Chart rendered on the server?

This tutorial page is server-rendered for SEO. The Mermaid syntax is shown as plain text so search engines and readers can inspect it without waiting for client-side rendering.

Can I edit this Quadrant Chart example?

Yes. Open the Mermaid editor, paste the example, and modify the labels, relationships, or values for your own use case.