diff --git a/packages/mermaid/src/diagrams/user-journey/journeyRenderer.ts b/packages/mermaid/src/diagrams/user-journey/journeyRenderer.ts index 9158a8c82..d0bb8e0c1 100644 --- a/packages/mermaid/src/diagrams/user-journey/journeyRenderer.ts +++ b/packages/mermaid/src/diagrams/user-journey/journeyRenderer.ts @@ -41,7 +41,7 @@ function drawActorLegend(diagram) { const tempText = diagram.append('text').attr('visibility', 'hidden').text(person); const textWidth = tempText.node().getBBox().width; tempText.remove(); - + let configObject = getConfig().journey; const maxLineLength = getRemInPx(15); let lines = []; diff --git a/packages/mermaid/src/schemas/config.schema.yaml b/packages/mermaid/src/schemas/config.schema.yaml index e1014e889..e94c3d69c 100644 --- a/packages/mermaid/src/schemas/config.schema.yaml +++ b/packages/mermaid/src/schemas/config.schema.yaml @@ -1485,6 +1485,12 @@ $defs: # JSON Schema definition (maybe we should move these to a separate file) type: integer default: 150 minimum: 0 + maxLabelWidth: + description: Maximum width of actor labels + type: integer + default: 360 + minimum: 240 + maximum: 480 width: description: Width of actor boxes type: integer