Skip to content

Commit 6369008

Browse files
authored
Add Gantt chart month format option (#57)
1 parent 69d9ee2 commit 6369008

File tree

1 file changed

+2
-1
lines changed
  • neoteroi/mkdocs/projects/gantt

1 file changed

+2
-1
lines changed

neoteroi/mkdocs/projects/gantt/html.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class VerticalLinesPace(Enum):
3535
class GanttViewOptions:
3636
id: str = ""
3737
month_width: float = 150
38+
month_format: str = "%B %Y"
3839
whole_years: bool = False
3940
no_groups: bool = False
4041
no_years: bool = False
@@ -221,7 +222,7 @@ def _build_months(self, periods_element, context: BuildContext):
221222
"style": f"width: {month_width}px;",
222223
},
223224
)
224-
month_element.text = month_date.strftime("%B %Y")
225+
month_element.text = month_date.strftime(self.options.month_format)
225226

226227
# add vertical line
227228
if self.options.vlines_pace == VerticalLinesPace.MONTHLY:

0 commit comments

Comments
 (0)