refactor: replace month dropdown with week dropdown and update related components
feat: add feedback functionality and modal for category feedback style: add feedback button styles in CSS docs: add explanation tab for dashboard usage instructions
This commit is contained in:
@ -12,15 +12,15 @@ def render(app: Dash, data: pd.DataFrame) -> html.Div:
|
||||
Output(ids.BAR_CHART, "children"),
|
||||
[
|
||||
Input(ids.YEAR_DROPDOWN, "value"),
|
||||
Input(ids.MONTH_DROPDOWN, "value"),
|
||||
Input(ids.WEEK_DROPDOWN, "value"),
|
||||
Input(ids.CATEGORY_DROPDOWN, "value"),
|
||||
],
|
||||
)
|
||||
def update_bar_chart(
|
||||
years: list[str], months: list[str], categories: list[str]
|
||||
years: list[str], weeks: list[str], categories: list[str]
|
||||
) -> html.Div:
|
||||
filtered_data = data.query(
|
||||
"year in @years and month in @months and category in @categories"
|
||||
"year in @years and week in @weeks and category in @categories"
|
||||
)
|
||||
|
||||
if filtered_data.shape[0] == 0:
|
||||
@ -45,4 +45,4 @@ def render(app: Dash, data: pd.DataFrame) -> html.Div:
|
||||
|
||||
return html.Div(dcc.Graph(figure=fig), id=ids.BAR_CHART)
|
||||
|
||||
return html.Div(id=ids.BAR_CHART)
|
||||
return html.Div(id=ids.BAR_CHART)
|
Reference in New Issue
Block a user