Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect docs for gantt chart side padding #5191

Closed
murdoa opened this issue Jan 11, 2024 · 0 comments · Fixed by #5192
Closed

Incorrect docs for gantt chart side padding #5191

murdoa opened this issue Jan 11, 2024 · 0 comments · Fixed by #5192
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@murdoa
Copy link

murdoa commented Jan 11, 2024

Description

The side padding behavior specified in the docs for the gantt chart is incorrect.

The docs have not been updated from an API change in commit 0cd04af
from May 23, 2016 and release 6.0.0.

The current docs list the following gantt config options, these look to have been added from a commit in 2019 adding the docs to this repo (69c7d31).

mermaid.ganttConfig = {
titleTopMargin: 25,
barHeight: 20,
barGap: 4,
topPadding: 75,
sidePadding: 75,
};

Purpose changing to :

mermaid.ganttConfig = {
titleTopMargin: 25, // Margin top for the text over the diagram
barHeight: 20, // The height of the bars in the graph
barGap: 4, // The margin between the different activities in the gantt diagram
topPadding: 50, // Margin between title and gantt diagram and between axis and gantt diagram.
rightPadding: 75, // The space allocated for the section name to the right of the activities
leftPadding: 75, // The space allocated for the section name to the left of the activities
gridLineStartPadding: 35, // Vertical starting position of the grid lines
fontSize: 11, // Font size
sectionFontSize: 11, // Font size for sections
numberSectionStyles: 4, // The number of alternating section styles
axisFormat: "%Y-%m-%d", // Date/time format of the axis
tickInterval: undefined, // Axis ticks
topAxis: false, // When this flag is set, date labels will be added to the top of the chart
displayMode: "", // Turns compact mode on
weekday: "sunday", // On which day a week-based interval should start
};

Steps to reproduce

  1. Navigate to syntax/gantt.md in the docs
  2. Note listed configuration options
  3. Navigate to packages/mermaid/src/config.type.ts
  4. Verify mismatch between configuration options GanttDiagramConfig

Screenshots

No response

Code Sample

No response

Setup

  • Mermaid version: v6.0.0+
  • Browser and Version: N/A

Suggested Solutions

No response

Additional Context

No response

@murdoa murdoa added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant