当前位置: 首页>>代码示例>>Python>>正文


Python dash_core_components.Checklist方法代码示例

本文整理汇总了Python中dash_core_components.Checklist方法的典型用法代码示例。如果您正苦于以下问题:Python dash_core_components.Checklist方法的具体用法?Python dash_core_components.Checklist怎么用?Python dash_core_components.Checklist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dash_core_components的用法示例。


在下文中一共展示了dash_core_components.Checklist方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: selector

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Checklist [as 别名]
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%'}) 
开发者ID:AustinRochford,项目名称:webmc3,代码行数:25,代码来源:components.py

示例2: edit_list

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Checklist [as 别名]
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] 
开发者ID:plotly,项目名称:dash-docs,代码行数:26,代码来源:todo.py

示例3: intersection_option

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Checklist [as 别名]
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),
            ],
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:35,代码来源:_well_cross_section_fmu.py

示例4: viz_options_layout

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Checklist [as 别名]
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,) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:12,代码来源:_well_cross_section.py

示例5: control_div

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Checklist [as 别名]
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",}],
            ),
        ] 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:50,代码来源:_parameter_correlation.py


注:本文中的dash_core_components.Checklist方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。