diff --git a/docs/syntax/flowchart.md b/docs/syntax/flowchart.md index 0ef94d24b..6ef8a1046 100644 --- a/docs/syntax/flowchart.md +++ b/docs/syntax/flowchart.md @@ -842,8 +842,8 @@ In the example below the style defined in the linkStyle statement will belong to ### Styling line curves It is possible to style the type of curve used for lines between items, if the default method does not meet your needs. -Available curve styles include `basis`, `bump`, `linear`, `monotoneX`, `monotoneY`, `natural`, `step`, `stepAfter`, -and `stepBefore`. +Available curve styles include `basis`, `bumpX`, `bumpY`, `cardinal`, `catmullRom`, `linear`, `monotoneX`, `monotoneY`, +`natural`, `step`, `stepAfter`, and `stepBefore`. In this example, a left-to-right graph uses the `stepBefore` curve style: diff --git a/packages/mermaid/src/diagrams/sequence/sequenceDiagram.spec.js b/packages/mermaid/src/diagrams/sequence/sequenceDiagram.spec.js index c509fdae5..8132a2666 100644 --- a/packages/mermaid/src/diagrams/sequence/sequenceDiagram.spec.js +++ b/packages/mermaid/src/diagrams/sequence/sequenceDiagram.spec.js @@ -52,8 +52,16 @@ vi.mock('d3', () => { curveBasis: 'basis', curveBasisClosed: 'basisClosed', curveBasisOpen: 'basisOpen', - curveLinear: 'linear', + curveBumpX: 'bumpX', + curveBumpY: 'bumpY', + curveBundle: 'bundle', + curveCardinalClosed: 'cardinalClosed', + curveCardinalOpen: 'cardinalOpen', curveCardinal: 'cardinal', + curveCatmullRomClosed: 'catmullRomClosed', + curveCatmullRomOpen: 'catmullRomOpen', + curveCatmullRom: 'catmullRom', + curveLinear: 'linear', curveLinearClosed: 'linearClosed', curveMonotoneX: 'monotoneX', curveMonotoneY: 'monotoneY', diff --git a/packages/mermaid/src/docs/syntax/flowchart.md b/packages/mermaid/src/docs/syntax/flowchart.md index 4ca3c5466..587b3b1fc 100644 --- a/packages/mermaid/src/docs/syntax/flowchart.md +++ b/packages/mermaid/src/docs/syntax/flowchart.md @@ -552,8 +552,8 @@ linkStyle 3 stroke:#ff3,stroke-width:4px,color:red; ### Styling line curves It is possible to style the type of curve used for lines between items, if the default method does not meet your needs. -Available curve styles include `basis`, `bump`, `linear`, `monotoneX`, `monotoneY`, `natural`, `step`, `stepAfter`, -and `stepBefore`. +Available curve styles include `basis`, `bumpX`, `bumpY`, `cardinal`, `catmullRom`, `linear`, `monotoneX`, `monotoneY`, +`natural`, `step`, `stepAfter`, and `stepBefore`. In this example, a left-to-right graph uses the `stepBefore` curve style: diff --git a/packages/mermaid/src/utils.ts b/packages/mermaid/src/utils.ts index 876c81543..76fce1999 100644 --- a/packages/mermaid/src/utils.ts +++ b/packages/mermaid/src/utils.ts @@ -4,6 +4,15 @@ import { curveBasis, curveBasisClosed, curveBasisOpen, + curveBumpX, + curveBumpY, + curveBundle, + curveCardinalClosed, + curveCardinalOpen, + curveCardinal, + curveCatmullRomClosed, + curveCatmullRomOpen, + curveCatmullRom, CurveFactory, curveLinear, curveLinearClosed, @@ -28,6 +37,15 @@ const d3CurveTypes = { curveBasis: curveBasis, curveBasisClosed: curveBasisClosed, curveBasisOpen: curveBasisOpen, + curveBumpX: curveBumpX, + curveBumpY: curveBumpY, + curveBundle: curveBundle, + curveCardinalClosed: curveCardinalClosed, + curveCardinalOpen: curveCardinalOpen, + curveCardinal: curveCardinal, + curveCatmullRomClosed: curveCatmullRomClosed, + curveCatmullRomOpen: curveCatmullRomOpen, + curveCatmullRom: curveCatmullRom, curveLinear: curveLinear, curveLinearClosed: curveLinearClosed, curveMonotoneX: curveMonotoneX,