AddResults
- class jdaviz.core.template_mixin.AddResults(plugin, label, label_default, label_auto, label_invalid_msg, label_overwrite, add_to_viewer_items, add_to_viewer_selected, label_whitelist_overwrite=[])[source] [edit on github]
Bases:
BasePluginComponent
Traitlets (in the object, custom traitlets in the plugin):
label
(string: user-provided label for the results data-entry. Iflabel_auto
, changesto
label_default
will updatelabel
. Otherwise, changes tolabel
will setlabel_auto
to False.)
label_default
(string: plugin-determined default label that will be synced tolabel
if/when
label_auto
is set to True)
label_auto
(bool: whether to synclabel_default
tolabel
)label_invalid_msg
(string: validation string for the current value oflabel
. Ifnot an empty string, calls to
add_results_from_plugin
will raise an error.)
label_overwrite
(bool: whether the value oflabel
already exists for a data-entryfrom the same plugin)
add_to_viewer_items
(list of dicts: seeViewerSelect
)add_to_viewer_selected
(string: name of the viewer to add the results,see
ViewerSelect
)
Methods:
add_results_from_plugin
Example template:
<plugin-add-results :label.sync="results_label" :label_default="results_label_default" :label_auto.sync="results_label_auto" :label_invalid_msg="results_label_invalid_msg" :label_overwrite="results_label_overwrite" label_hint="Label for the smoothed data" :add_to_viewer_items="add_to_viewer_items" :add_to_viewer_selected.sync="add_to_viewer_selected" action_label="Apply" action_tooltip="Apply the action to the data" @click:action="apply" ></plugin-add-results>
Methods Summary
add_results_from_plugin
(data_item[, replace])Add
data_item
to the app's data_collection according to the default or user-provided label and adds to any requested viewers.Methods Documentation
- add_results_from_plugin(data_item, replace=None)[source] [edit on github]
Add
data_item
to the app’s data_collection according to the default or user-provided label and adds to any requested viewers.