Python dash_core_components.Checklist() Examples
The following are 5
code examples of dash_core_components.Checklist().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
dash_core_components
, or try the search function
.
Example #1
Source File: components.py From webmc3 with Apache License 2.0 | 6 votes |
def selector(title, trace, varname, include_transformed_chooser=True): children = [ html.Label("Variable"), dcc.Dropdown( id='{}-selector'.format(title), options=get_varname_options(trace), value=varname ) ] if include_transformed_chooser: children.append( dcc.Checklist( id='{}-selector-include-transformed'.format(title), options=[{ 'label': "Include transformed variables", 'value': 'include_transformed' }], values=[] ) ) return html.Div(children, style={'width': '20%'})
Example #2
Source File: todo.py From dash-docs with MIT License | 6 votes |
def edit_list(add, add2, clear, new_item, items, items_done): triggered = [t["prop_id"] for t in dash.callback_context.triggered] adding = len([1 for i in triggered if i in ("add.n_clicks", "new-item.n_submit")]) clearing = len([1 for i in triggered if i == "clear-done.n_clicks"]) new_spec = [ (text, done) for text, done in zip(items, items_done) if not (clearing and done) ] if adding: new_spec.append((new_item, [])) new_list = [ html.Div([ dcc.Checklist( id={"index": i, "type": "done"}, options=[{"label": "", "value": "done"}], value=done, style={"display": "inline"}, labelStyle={"display": "inline"} ), html.Div(text, id={"index": i}, style=style_done if done else style_todo) ], style={"clear": "both"}) for i, (text, done) in enumerate(new_spec) ] return [new_list, "" if adding else new_item]
Example #3
Source File: _well_cross_section_fmu.py From webviz-subsurface with GNU General Public License v3.0 | 5 votes |
def intersection_option(self): options = [ {"label": "Keep zoom state", "value": "keep_zoom_state"}, {"label": "Show surface fill", "value": "show_surface_fill"}, ] value = ["show_surface_fill"] if self.segyfiles: options.append({"label": "Show seismic", "value": "show_seismic"}) if self.zonelog is not None: options.append({"label": "Show zonelog", "value": "show_zonelog"}) value.append("show_zonelog") return html.Div( style=self.set_style(marginTop="20px"), children=[ html.Label("Intersection settings", style={"font-weight": "bold"}), html.Label("Sampling"), dcc.Input( id=self.ids("sampling"), debounce=True, type="number", value=self.sampling, ), html.Label("Extension"), dcc.Input( id=self.ids("nextend"), debounce=True, type="number", value=self.nextend, ), dcc.Checklist(id=self.ids("options"), options=options, value=value), ], )
Example #4
Source File: _well_cross_section.py From webviz-subsurface with GNU General Public License v3.0 | 5 votes |
def viz_options_layout(self): options = [{"label": "Show surface fill", "value": "show_surface_fill"}] value = ["show_surface_fill"] if self.segyfiles: options.append({"label": "Show seismic", "value": "show_seismic"}) if self.zonelog: options.append({"label": "Show zonelog", "value": "show_zonelog"}) value.append("show_zonelog") return dcc.Checklist(id=self.ids("options"), options=options, value=value,)
Example #5
Source File: _parameter_correlation.py From webviz-subsurface with GNU General Public License v3.0 | 4 votes |
def control_div(self): return [ html.Div( style={"padding": "5px"}, children=[ html.Label( "Parameter horizontal axis:", style={"font-weight": "bold"}, ), dcc.Dropdown( id=self.ids("parameter1"), options=[{"label": p, "value": p} for p in self.p_cols], value=self.p_cols[0], clearable=False, ), Widgets.dropdown_from_dict(self.ids("ensemble-1"), self.ensembles), ], ), html.Div( style={"padding": "5px"}, children=[ html.Label( "Parameter vertical axis:", style={"font-weight": "bold"} ), dcc.Dropdown( id=self.ids("parameter2"), options=[{"label": p, "value": p} for p in self.p_cols], value=self.p_cols[0], clearable=False, ), Widgets.dropdown_from_dict(self.ids("ensemble-2"), self.ensembles), ], ), html.Div( style={"padding": "5px"}, children=[ html.Label("Color scatter by:", style={"font-weight": "bold"}), dcc.Dropdown( id=self.ids("scatter-color"), options=[{"label": p, "value": p} for p in self.p_cols], ), ], ), dcc.Checklist( id=self.ids("density"), style={"padding": "5px"}, options=[{"label": "Show scatterplot density", "value": "density",}], ), ]