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


Python dash_core_components.Dropdown方法代码示例

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


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

示例1: attribute_selector

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [as 别名]
def attribute_selector(self):
        return html.Div(
            style={"display": "grid"},
            children=[
                html.Label("Surface attribute"),
                html.Div(
                    style=self.set_grid_layout("6fr 1fr"),
                    children=[
                        dcc.Dropdown(
                            id=self.attr_id,
                            options=[
                                {"label": attr, "value": attr} for attr in self.attrs
                            ],
                            value=self.attrs[0],
                            clearable=False,
                        ),
                        self._make_buttons(
                            self.attr_id_btn_prev, self.attr_id_btn_next
                        ),
                    ],
                ),
            ],
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:25,代码来源:surface_selector.py

示例2: well_layout

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [as 别名]
def well_layout(self):
        return html.Div(
            children=html.Label(
                children=[
                    html.Span("Well:", style={"font-weight": "bold"}),
                    dcc.Dropdown(
                        id=self.ids("wells"),
                        options=[
                            {"label": Path(well).stem, "value": well}
                            for well in self.wellfiles
                        ],
                        value=self.wellfiles[0],
                        clearable=False,
                    ),
                ]
            )
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:19,代码来源:_well_cross_section_fmu.py

示例3: surface_names_layout

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [as 别名]
def surface_names_layout(self):
        return html.Div(
            style=self.set_style(marginTop="20px"),
            children=html.Label(
                children=[
                    html.Span("Surface:", style={"font-weight": "bold"}),
                    dcc.Dropdown(
                        id=self.ids("surfacenames"),
                        options=[
                            {"label": name, "value": name} for name in self.surfacenames
                        ],
                        value=self.surfacenames,
                        clearable=True,
                        multi=True,
                    ),
                ]
            ),
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:20,代码来源:_well_cross_section_fmu.py

示例4: ensemble_layout

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [as 别名]
def ensemble_layout(self):
        return html.Div(
            style=self.set_style(marginTop="20px"),
            children=html.Label(
                children=[
                    html.Span("Ensemble:", style={"font-weight": "bold"}),
                    dcc.Dropdown(
                        id=self.ids("ensembles"),
                        options=[
                            {"label": ens, "value": ens}
                            for ens in self.ensembles.keys()
                        ],
                        value=list(self.ensembles.keys())[0],
                        clearable=False,
                        multi=False,
                    ),
                ]
            ),
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:21,代码来源:_well_cross_section_fmu.py

示例5: marginal_log_layout

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [as 别名]
def marginal_log_layout(self):
        if self.marginal_logs is not None:
            return html.Div(
                children=html.Label(
                    children=[
                        html.Span("Marginal log:", style={"font-weight": "bold"}),
                        dcc.Dropdown(
                            id=self.ids("marginal-log"),
                            options=[
                                {"label": log, "value": log}
                                for log in self.marginal_logs
                            ],
                            placeholder="Display log",
                            clearable=True,
                        ),
                    ]
                ),
            )
        return html.Div(
            style={"visibility": "hidden"},
            children=dcc.Dropdown(id=self.ids("marginal-log")),
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:24,代码来源:_well_cross_section_fmu.py

示例6: selector

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [as 别名]
def selector(self, label, id_name, column):
        return html.Div(
            children=html.Label(
                children=[
                    html.Span(f"{label}:", style={"font-weight": "bold"}),
                    dcc.Dropdown(
                        id=self.uuid(id_name),
                        options=[
                            {"label": i, "value": i}
                            for i in list(self.volumes[column].unique())
                        ],
                        clearable=False,
                        value=list(self.volumes[column])[0],
                    ),
                ]
            ),
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:19,代码来源:_inplace_volumes_onebyone.py

示例7: plot_selector

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [as 别名]
def plot_selector(self):
        """Radiobuttons to select plot type"""
        return html.Div(
            children=[
                html.Span("Plot type:", style={"font-weight": "bold"}),
                dcc.Dropdown(
                    id=self.uuid("plot-type"),
                    options=[
                        {"label": i, "value": i}
                        for i in [
                            "Per realization",
                            "Per sensitivity name",
                            "Per sensitivity case",
                        ]
                    ],
                    value="Per realization",
                    clearable=False,
                ),
            ]
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:22,代码来源:_inplace_volumes_onebyone.py

示例8: response_selector

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [as 别名]
def response_selector(self):
        """Dropdown to select volumetric response"""
        return html.Div(
            children=html.Label(
                children=[
                    html.Span("Volumetric calculation:", style={"font-weight": "bold"}),
                    dcc.Dropdown(
                        id=self.uuid("response"),
                        options=[
                            {"label": volume_description(i), "value": i}
                            for i in self.responses
                        ],
                        clearable=False,
                        value=self.initial_response
                        if self.initial_response in self.responses
                        else self.responses[0],
                    ),
                ]
            ),
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:22,代码来源:_inplace_volumes_onebyone.py

示例9: ensemble_selector

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [as 别名]
def ensemble_selector(self):
        """Dropdown to select ensemble"""
        return html.Div(
            style={"paddingBottom": "30px"},
            children=html.Label(
                children=[
                    html.Span("Ensemble:", style={"font-weight": "bold"}),
                    dcc.Dropdown(
                        id=self.ids("ensemble"),
                        options=[
                            {"label": i, "value": i}
                            for i in list(self.data["ENSEMBLE"].unique())
                        ],
                        clearable=False,
                        value=list(self.data["ENSEMBLE"].unique())[0],
                    ),
                ]
            ),
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:21,代码来源:_reservoir_simulation_timeseries_onebyone.py

示例10: smry_selector

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [as 别名]
def smry_selector(self):
        """Dropdown to select ensemble"""
        return html.Div(
            style={"paddingBottom": "30px"},
            children=html.Label(
                children=[
                    html.Span("Time series:", style={"font-weight": "bold"}),
                    dcc.Dropdown(
                        id=self.ids("vector"),
                        options=[
                            {
                                "label": f"{simulation_vector_description(vec)} ({vec})",
                                "value": vec,
                            }
                            for vec in self.smry_cols
                        ],
                        clearable=False,
                        value=self.initial_vector,
                    ),
                ]
            ),
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:24,代码来源:_reservoir_simulation_timeseries_onebyone.py

示例11: well_layout

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [as 别名]
def well_layout(self):
        return html.Div(
            children=html.Label(
                children=[
                    html.Span("Well:", style={"font-weight": "bold"}),
                    dcc.Dropdown(
                        id=self.ids("wells"),
                        options=[
                            {"label": Path(well).stem, "value": well}
                            for well in self.wellfiles
                        ],
                        value=self.wellfiles[0],
                        clearable=False,
                    ),
                ]
            ),
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:19,代码来源:_well_cross_section.py

示例12: seismic_layout

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [as 别名]
def seismic_layout(self):
        return html.Div(
            style={} if self.segyfiles else {"display": "none"},
            children=html.Label(
                children=[
                    html.Span("Seismic:", style={"font-weight": "bold"}),
                    dcc.Dropdown(
                        id=self.ids("cube"),
                        options=[
                            {"label": Path(segy).stem, "value": segy}
                            for segy in self.segyfiles
                        ]
                        if self.segyfiles
                        else None,
                        value=self.segyfiles[0] if self.segyfiles else None,
                        clearable=False,
                    ),
                ]
            ),
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:22,代码来源:_well_cross_section.py

示例13: selector

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [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

示例14: display_dropdowns

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [as 别名]
def display_dropdowns(n_clicks, children):
    new_element = html.Div([
        dcc.Dropdown(
            id={
                'type': 'dynamic-dropdown',
                'index': n_clicks
            },
            options=[{'label': i, 'value': i} for i in ['NYC', 'MTL', 'LA', 'TOKYO']]
        ),
        html.Div(
            id={
                'type': 'dynamic-output',
                'index': n_clicks
            }
        )
    ])
    children.append(new_element)
    return children 
开发者ID:plotly,项目名称:dash-docs,代码行数:20,代码来源:simple_match.py

示例15: display_dropdowns

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import Dropdown [as 别名]
def display_dropdowns(n_clicks, existing_children):
    existing_children.append(html.Div([
        dcc.Dropdown(
            id={
                'type': 'filter-dropdown-ex3',
                'index': n_clicks
            },
            options=[{'label': i, 'value': i} for i in df['country'].unique()],
            value=df['country'].unique()[n_clicks]
        ),
        html.Div(id={
            'type': 'output-ex3',
            'index': n_clicks
        })
    ]))
    return existing_children 
开发者ID:plotly,项目名称:dash-docs,代码行数:18,代码来源:simple_allsmaller.py


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