Skip to content

Timeline does not honor width configuration #5858

Open
@tncbbthositg

Description

Description

When I try to alter the width of the nodes in the timeline diagram with the width configuration, the width configuration is not applied.

It appears to be hardcoded here:
https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/diagrams/timeline/timelineRenderer.ts#L332

Steps to reproduce

Create a timeline
Configure the width
Feel sad

Screenshots

No response

Code Sample

{
  "theme": "default",
  "themeVariables": {
    "fontSize": "24px"
  },
  "timeline": {
    "width": 300
  }
}

timeline
title Sample Timeline

2022
    : October <br> Something that happened in October

2023
    : Something that happened in 2023

Setup

Live Editor
Chrome

Suggested Solutions

https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/diagrams/timeline/timelineRenderer.ts#L332

This should probably be conf.width . . . or conf.timeline.width.

Additional Context

No response

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions