question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature request] gantt diagram axis format

See original GitHub issue

We can define gantt diagram date format like following:

dateFormat  YYYY-MM-DD

What I am requesting is similar: let user define axis format like following

axisFormat %-m/%-d

Currently user defined axis format is not supported. It can only be done via js code:

mermaid.ganttConfig = {
  axisFormatter: [
    ["%-m/%-d", function (d) {
        return d.getDay() == 1;
    }]
  ]
};

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:12
  • Comments:12

github_iconTop GitHub Comments

10reactions
tylerlongcommented, Mar 15, 2018

This feature is available in latest version.

There are two ways to specify gantt diagram xAxis format:

Option 1

mermaid.initialize({
      gantt: { axisFormat: '%m/%d/%Y' }
});

Then all gantt diagrams in the current web page will use axisFormat: '%m/%d/%Y'

Option 2

<div class="mermaid">
gantt
dateFormat  YYYY-MM-DD
axisFormat  %m/%d/%Y
...
</div>

Then the current gantt diagram will use axisFormat %m/%d/%Y

Which one to use:

Option 1 is like global config while option 2 is like local config. If both are specified, option 2 overrides options 1.

5reactions
knsvcommented, Dec 17, 2015

Thats a good idea! This should be implemented.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Help:Gantt format - semantic-mediawiki.org
Gantt format. Outputs the result as Gantt charts. Further Information ... axisformat = Allows to format the axis of your chart.
Read more >
Gantt Chart: The Ultimate Guide (with Examples)
A Gantt chart is a stacked bar chart that contains project tasks on a vertical axis and timelines that represent task duration on...
Read more >
The Ultimate Guide to Gantt Charts [with Examples]
A Gantt chart is a bar chart with two axes – a horizontal one and a vertical one. The first one is used...
Read more >
11 Gantt Chart Examples and Templates For Effective Project ...
Milestones on the bottom axis; And bars that show when each task should begin and end. Of course, more complex projects require more...
Read more >
3 Ways to Make Gorgeous Gantt Charts in Tableau
Gantt charts are one of the few chart types that the Sample – Superstore dataset does not have a good use case for....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found