Skip to content

Commit 918316e

Browse files
committed
🏗️ fix upload datatable and typo
1 parent f850224 commit 918316e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from click import edit
12
import dash
23
import dash_bootstrap_components as dbc
34
import pandas as pd
@@ -83,7 +84,7 @@ def callback_upload(content, filename, filedate, _):
8384

8485
if ctx.triggered[0]["prop_id"] == "button-skip.n_clicks":
8586
dataframe = pd.read_csv(
86-
Path(r"./example_9Y1S_named.csv"), index_col=0, parse_dates=True
87+
Path(r"./example_2Y4S_named.csv"), index_col=0, parse_dates=True
8788
)
8889
filename = None
8990
filedate = None
@@ -94,7 +95,7 @@ def callback_upload(content, filename, filedate, _):
9495
button_viz_outline = True
9596

9697
if dataframe is not None:
97-
editable = [False] + [True] * max(1, (len(dataframe.columns) - 1))
98+
editable = [False] + [True] * len(dataframe.columns)
9899
children = pylayoutfunc.create_table_layout(
99100
dataframe,
100101
"output-table",

pyfigure.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ def figure_consistency(cumsum: pd.DataFrame, col: str) -> go.Figure:
599599
+ f"<i>{equation}</i><br>"
600600
+ f"<i>R<sup>2</sup>: {r2}</i><br>"
601601
+ "<b>%{y} mm</b> (trend)<br>"
602-
+ "<i>%{x}</i>"
602+
+ "<i>%{x} mm</i>"
603603
+ "<extra></extra>"
604604
)
605605
_trendline.hovertemplate = _newtemplate
@@ -612,6 +612,7 @@ def figure_consistency(cumsum: pd.DataFrame, col: str) -> go.Figure:
612612
yaxis_title=f"<b>Cumulative Average Annual (mm)</b>",
613613
margin=dict(l=0, t=35, b=0, r=0),
614614
yaxis_tickformat=".0f",
615+
xaxis_tickformat=".0f",
615616
)
616617

617618
return dcc.Graph(figure=fig)

0 commit comments

Comments
 (0)