Skip to content

Conversation

@exoego
Copy link
Contributor

@exoego exoego commented Oct 4, 2024

📑 Summary

Resolves #2583

📏 Design Decisions

This PR leverages upsetjs/venn.js, which is a maintained d3 plugin for Venn/Euler diagram.

My syntax proposal is:

  • set defines a circle or an intersection
    • set A and set B defines a circle A and B
    • set A,B defines an intersection between A and B
  • text defines a text node which belongs to one of set
venn-beta
    title Many text nodes in debug text layout mode
    set A      label: Five nodes,  size: 18
    set B      label: Nine nodes,  size: 18
    set A,B    label: Common,      size: 3
    text A     label: A1
    text A     label: A2
    text A     label: A3

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added necessary unit/e2e tests.
  • 📓 have added documentation. Make sure MERMAID_RELEASE_VERSION is used for all new features.
  • 🦋 If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Screenshot

Preview on Mermaid Live Editor Dark Mode
1 2
image image
image

@changeset-bot
Copy link

changeset-bot bot commented Oct 4, 2024

🦋 Changeset detected

Latest commit: d710d14

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
mermaid Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Oct 4, 2024

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit 7aefbc3
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/671d82ff0f23800008178ea3
😎 Deploy Preview https://deploy-preview-5932--mermaid-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 5, 2024

Open in StackBlitz

@mermaid-js/examples

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/examples@5932

mermaid

npm i https://pkg.pr.new/mermaid-js/mermaid@5932

@mermaid-js/layout-elk

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/layout-elk@5932

@mermaid-js/layout-tidy-tree

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/layout-tidy-tree@5932

@mermaid-js/mermaid-zenuml

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/mermaid-zenuml@5932

@mermaid-js/parser

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/parser@5932

@mermaid-js/tiny

npm i https://pkg.pr.new/mermaid-js/mermaid/@mermaid-js/tiny@5932

commit: d710d14

@codecov
Copy link

codecov bot commented Oct 5, 2024

Codecov Report

❌ Patch coverage is 2.31884% with 337 lines in your changes missing coverage. Please review.
✅ Project coverage is 3.56%. Comparing base (d5bc07d) to head (d710d14).

Files with missing lines Patch % Lines
packages/mermaid/src/diagrams/venn/vennRenderer.ts 0.51% 194 Missing ⚠️
packages/mermaid/src/diagrams/venn/vennDB.ts 1.42% 69 Missing ⚠️
packages/mermaid/src/diagrams/venn/styles.ts 0.00% 36 Missing ⚠️
packages/mermaid/src/diagrams/venn/vennDetector.ts 7.14% 13 Missing ⚠️
packages/examples/src/examples/venn.ts 10.00% 9 Missing ⚠️
packages/mermaid/src/diagrams/venn/vennDiagram.ts 10.00% 9 Missing ⚠️
...s/mermaid/src/diagram-api/diagram-orchestration.ts 0.00% 3 Missing ⚠️
packages/examples/src/index.ts 0.00% 2 Missing ⚠️
.build/jsonSchema.ts 0.00% 1 Missing ⚠️
packages/mermaid/src/docs/.vitepress/config.ts 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #5932      +/-   ##
==========================================
- Coverage     3.57%   3.56%   -0.01%     
==========================================
  Files          473     480       +7     
  Lines        47475   47819     +344     
  Branches       734     741       +7     
==========================================
+ Hits          1696    1704       +8     
- Misses       45779   46115     +336     
Flag Coverage Δ
unit 3.56% <2.31%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/mermaid/src/config.type.ts 100.00% <ø> (ø)
packages/mermaid/src/defaultConfig.ts 41.31% <100.00%> (+0.55%) ⬆️
packages/mermaid/src/diagrams/venn/vennTypes.ts 100.00% <100.00%> (ø)
.build/jsonSchema.ts 0.00% <0.00%> (ø)
packages/mermaid/src/docs/.vitepress/config.ts 0.40% <0.00%> (-0.01%) ⬇️
packages/examples/src/index.ts 2.08% <0.00%> (-0.10%) ⬇️
...s/mermaid/src/diagram-api/diagram-orchestration.ts 0.00% <0.00%> (ø)
packages/examples/src/examples/venn.ts 10.00% <10.00%> (ø)
packages/mermaid/src/diagrams/venn/vennDiagram.ts 10.00% <10.00%> (ø)
packages/mermaid/src/diagrams/venn/vennDetector.ts 7.14% <7.14%> (ø)
... and 3 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@argos-ci
Copy link

argos-ci bot commented Oct 5, 2024

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Dec 22, 2025, 1:01 AM

@piranna
Copy link

piranna commented Dec 17, 2024

This draft has broken CI and conflicts, how can we move It forward?

@exoego
Copy link
Contributor Author

exoego commented Dec 17, 2024

I am still working to add text nodes in each circle.

@FKSI
Copy link

FKSI commented Apr 8, 2025

+1 any timeline on this one? :)

@dgrr
Copy link

dgrr commented Jul 15, 2025

wen

@schoettler
Copy link

This draft has broken CI and conflicts, how can we move It forward?

By forking @exoego 's PR and fixing the conflicts + broken CI. Hopefully adding the text in each node as he mentioned.

@Inviz
Copy link

Inviz commented Oct 23, 2025

It's a shame that this stalls, looks like a solid implementation of a very needed feature

@netlify
Copy link

netlify bot commented Dec 21, 2025

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit d710d14
🔍 Latest deploy log https://app.netlify.com/projects/mermaid-js/deploys/6948964859132c0008212a29
😎 Deploy Preview https://deploy-preview-5932--mermaid-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@exoego exoego marked this pull request as ready for review December 21, 2025 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Venn Diagram Syntax

6 participants