The logger captures two different classes of events. One is UI events from Lux, another is events from the Jupyter notebook environment. The logger is only enabled after the detection of lux.logger=True
and it can be disabled with lux.logger=False
.
The logged CustomEvents are dispatched from the Lux Jupyter widget frontend. This logger extension contains a listener that detects these LOG events. These LOG event contain a JSON in the field detail
with two subfields:
action
: string name of the event actionparam
: Other relevant parameters
The events captured in Lux widget includes:
initWidget
: initialize widget (corresponds to when the widget is triggered and toggled[TODO:need verification])param
: None
exportBtnClick
: Export Button is clickedparam
:this.state._exportedVisIdxs
, dictionary of selected visualization index, keyed by the tab name. Example:{'Vis List': [0, 2]}
switchTab
: Click on tab to switch to a different tabparam
: Title of tab that user has switched to (i.e., name of the action)
clickVis
/unclickVis
: Selecting or de-selecting a single visualization through clickingparam
:index
of the visualization selected or de-selected (starting from 0),tableTitle
: Title of tab that user is currently ontitle
: Vega-Lite specification of title, will not be present if no titlemark
: Vega-Lite specification of markencoding
: Vega-Lite specification of encoding
- Note that the
exportBtnClick
can access theclickVis
/unclickVis
vis information.
startScroll/stopScroll
: Start and stop events for scrolling through the recommendation chart galleryparam
: Title of tab that user is scrolling through (i.e., name of the action)
toggleBtnClick
: Toggle Button for switching between Pandas/Lux is clickedparam
: Display type that user is switching to.
deleteBtnClick
: Delete Button for removing visualizations from the widget displayparam
:this.state._exportedVisIdxs
, dictionary of selected visualization index, keyed by the tab name. Example:{'Vis List': [0, 2]}
closeExportInfo
: Close the pop up that explains what export doesopenWarning
: Open warning panelparam
: Display warning message
closeWarning
: Close warning panelparam
: Display warning message
A list of all Javascript events from Jupyter is listed here, it can also be accessed via IPython.events
.
editMarkdownCell
/editCodeCell
: Records when user edits a cell, via the eventedit_mode.Cell
.selectMarkdownCell
/selectCodeCell
: Records when user selected or is interacting with a Cell, via the eventcommand_mode.Cell
.deleteMarkdownCell
/deleteCodeCell
: Records when the user deletes a code or markdown cell, via the eventdelete.Cell
.executeCodeCell
: Records when user executes a code cell, via the eventexecute.CodeCell
.completeCodeCell
: Records when the executed code cell is finished with execution, via the eventfinished_execute.CodeCell
.isPrintPandasDf
/isPrintLuxDf
: captures whether the printed dataframe is displayed as Pandas or a Lux widget or neither.isPrintVis
/isPrintVisCollection
: captures whether a Vis or Vis List is printed.
kernelReady
: Records when the IPython kernel is ready, usually indicating the start of a new session (either opening a new session or reopening of the page), via thekernel_ready.Kernel
event.kernelRestart
: Records when the IPython kernel restarts, via thekernel_restarting.Kernel
event.kernelKilled
: Records when the IPython kernel is killed, via thekernel_killed.Session
andkernel_killed.Kernel
event.
Not yet added:
- Toggle between Lux and Pandas view
- BUG: initWidget triggered twice when rendering widget