Skip to content

Commit

Permalink
Add Gantt chart month format option (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
yasamoka authored Feb 1, 2024
1 parent 69d9ee2 commit 6369008
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neoteroi/mkdocs/projects/gantt/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class VerticalLinesPace(Enum):
class GanttViewOptions:
id: str = ""
month_width: float = 150
month_format: str = "%B %Y"
whole_years: bool = False
no_groups: bool = False
no_years: bool = False
Expand Down Expand Up @@ -221,7 +222,7 @@ def _build_months(self, periods_element, context: BuildContext):
"style": f"width: {month_width}px;",
},
)
month_element.text = month_date.strftime("%B %Y")
month_element.text = month_date.strftime(self.options.month_format)

# add vertical line
if self.options.vlines_pace == VerticalLinesPace.MONTHLY:
Expand Down

0 comments on commit 6369008

Please sign in to comment.