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

tickInterval option with the possibility to select "second" as unit #4843

Closed
K-lone opened this issue Sep 15, 2023 · 1 comment
Closed

tickInterval option with the possibility to select "second" as unit #4843

K-lone opened this issue Sep 15, 2023 · 1 comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@K-lone
Copy link

K-lone commented Sep 15, 2023

Proposal

Hi ! I would like to use Gantt charts as an easy and flexible way to draw chronologies for historic and archaeologic purposes using markdown and mermaid language. For this, I needed to be able to include negative and large dates.

From what I red, the only way is to build gantt graph with a x-axis in second (%s). It works like a charm but I have a problem when dealing with the tick intervals. As mentionned by DarkNami in #1598 and #3729, supported units for the tick interval option are: minute, hour, day, week, month. I cannot fix the intervals and the output is quite ugly :( Is there any way to add second as unit for time interval ? Thanks !

PS: I had an example with real data ... but it seems that the compact display mode is not working on github. Anyway, it shows the tickInterval problem !

Example

---
displayMode: compact
---
%%{init: { "theme": "neutral", "themeVariables": { 'fontFamily": "Times" } } }%%
gantt
    title Archaeological periods
    dateFormat X
    axisFormat %s  
    section Western Europe
        Mesolithic   : -8800, -4900
        Neolithic : -4900, -2000
        Bronze age: done, -2000, -800
        Iron age: done, -1100, -1
        Roman: -56, 400
        Early Middle Ages: done, 400, 800
        Early Middle Ages: done, 800, 1500
        Post-medieval period: 1500, 1800
        Modern: crit, 1800, 2023
Loading

Screenshots

No response

@K-lone K-lone added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Sep 15, 2023
@K-lone K-lone changed the title tickInterval with the second option tickInterval option with the possibility to select "second" as unit Sep 15, 2023
@sidharthv96
Copy link
Member

sidharthv96 commented Sep 16, 2023

Fixed in #4778
Will be released soon.

Try here

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: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants