Skip to content

Commit 5df8cb5

Browse files
committed
Add the bit necessary for the traitlet to sync to the front end
This is not actually used here, but is a good practice.
1 parent 8380e7a commit 5df8cb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

03c_other_dashboard_elements.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
"DATA_FILE = 'land-ocean-temp-index.csv'\n",
214214
"\n",
215215
"class DataAndPlot(tr.HasTraits):\n",
216-
" smoothing_info = tr.Dict(allow_none=True, default=None)\n",
216+
" smoothing_info = tr.Dict(allow_none=True, default=None).tag(sync=True)\n",
217217
" \n",
218218
" def __init__(self):\n",
219219
" self.original_data = pd.read_csv(Path(DATA_DIR) / DATA_FILE, escapechar='#')\n",
@@ -319,7 +319,7 @@
319319
"source": [
320320
"# TODO: write answer \n",
321321
"\n",
322-
"dap.smoothing_info[\"window_size\"] = 8"
322+
"dap.smoothing_info[\"window_size\"] = 2"
323323
]
324324
},
325325
{

0 commit comments

Comments
 (0)