maxschulz-COL commited on
Commit
4cad7c1
·
verified ·
1 Parent(s): bbcf6eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -32,14 +32,14 @@ empty_figure = go.Figure(
32
  Output("output_chart", "figure", allow_duplicate=True),
33
  Input("__input_editing-grid2", "cellValueChanged"),
34
  Input("__input_editing-grid2", "rowData"),
35
- Input("theme_selector", "checked"),
36
  prevent_initial_call=True
37
  )
38
  def update(_, rows,theme_selector):
39
  dff = pd.DataFrame(rows)
40
  if dff.empty:
41
  return empty_figure
42
- fig = px.line(dff,title = "Timeline of input data", x="date", y="value")
43
  fig.update_layout(template="vizro_light" if theme_selector else "vizro_dark") #to get the theme right
44
  return fig
45
 
@@ -85,7 +85,7 @@ page = vm.Page(
85
  dashGridOptions={"rowSelection": "multiple", "suppressRowClickSelection": True},
86
  ),
87
  ),
88
- vm.Graph(id = "output_chart",figure = px.line(df,x="date", y="value")),
89
  vm.Button(
90
  id="delete-row-btn",
91
  text="Delete row",
 
32
  Output("output_chart", "figure", allow_duplicate=True),
33
  Input("__input_editing-grid2", "cellValueChanged"),
34
  Input("__input_editing-grid2", "rowData"),
35
+ Input("theme-selector", "checked"),
36
  prevent_initial_call=True
37
  )
38
  def update(_, rows,theme_selector):
39
  dff = pd.DataFrame(rows)
40
  if dff.empty:
41
  return empty_figure
42
+ fig = px.line(dff, x="date", y="value")
43
  fig.update_layout(template="vizro_light" if theme_selector else "vizro_dark") #to get the theme right
44
  return fig
45
 
 
85
  dashGridOptions={"rowSelection": "multiple", "suppressRowClickSelection": True},
86
  ),
87
  ),
88
+ vm.Graph(id = "output_chart",figure = px.line(df,x="date", y="value"),title="See the results of editable table here"),
89
  vm.Button(
90
  id="delete-row-btn",
91
  text="Delete row",