Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
Signed-off-by: Yicheng-Lu-llll <luyc58576@gmail.com>
  • Loading branch information
Yicheng-Lu-llll committed Apr 24, 2023
1 parent 5bcf6b8 commit 25f3549
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class TableRenderer:
Convert a pandas DataFrame into an HTML table.
"""

def to_html(self, df: pandas.DataFrame, header_labels: list = None, table_width: int = None) -> str:
def to_html(self, df: pd.DataFrame, header_labels: list = None, table_width: int = None) -> str:
# Check if custom labels are provided and have the correct length
if header_labels is not None and len(header_labels) == len(df.columns):
df = df.copy()
Expand Down Expand Up @@ -139,7 +139,7 @@ class GanttChartRenderer:
- "Name": string (the name of the task or event)
"""

def to_html(self, df: pandas.DataFrame, chart_width: int = None) -> str:
def to_html(self, df: pd.DataFrame, chart_width: int = None) -> str:
fig = px.timeline(df, x_start="Start", x_end="Finish", y="Name", color="Name", width=chart_width)

fig.update_xaxes(
Expand Down

0 comments on commit 25f3549

Please sign in to comment.