Gantt: add 'year' in axis ticks #6533
Labels
Status: Triage
Needs to be verified, categorized, etc
Type: Bug / Error
Something isn't working or is incorrect
8000
Description
Currently, the automatic axis are good for long historical dates, but axis ticks only includes intervals up to 'month'
Looking on the D3 website mentioned they changed format two years ago (#todo update link?) but looking back it just shows how D3 can be used.
The D3/src folder contains 'year' as does duration.js updated with it Apr 2021
I'm hoping this change might be relatively trivial?
Steps to reproduce
Screenshots
examples;

6month ☑️
12month ☑️ ('1year' workaround)

1year ❎ (shows 5year)

4year ❎ (shows 5year)

10year ❎ (shows 5year)

~ Setting Removed ☑️ (shows 5year, good default)

What I mean by the 🟩 10month 'bug' - this might be intentional to only show marks on Oct and NewYear, rather than every 10months? Just a warning just incase code is copied.

Mermaid has good handling - 10year, 20year, 50year, 100year, etc even to 9999



Code Sample
Setup
Suggested Solutions
I've done a quick look through code, and results below. I ^think^ that D3 supporting the term already will mean that it might be fairly trivial to impliment? And to test?
I think the main pattern definition is here, with two case statement straight after and in the following function for topaxis. There is a D3 import at the top.
Reference here and Commented reference here
Additional Context
Many thanks for all the work done, and consideration 😁
The text was updated successfully, but these errors were encountered: