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


Python dash_core_components.RadioItems方法代码示例

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


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

示例1: layout

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import RadioItems [as 别名]
def layout(self):
        return html.Div(
            [
                html.P(
                    f"This is the disk usage on \
                        {self.scratch_dir} per user, \
                        as of {self.date}."
                ),
                dcc.RadioItems(
                    id=self.plot_type_id,
                    options=[
                        {"label": i, "value": i} for i in ["Pie chart", "Bar chart"]
                    ],
                    value="Pie chart",
                ),
                wcc.Graph(id=self.chart_id),
            ]
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:20,代码来源:_disk_usage.py

示例2: __init__

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import RadioItems [as 别名]
def __init__(self, parent_name, local_name, option_lst, is_inline):
        Component.__init__(self, parent_name, local_name)
        self._register(
            dcc.RadioItems(
                id=self.full_name,
                options=[{
                    'label': v,
                    'value': v
                } for v in option_lst],
                # value=option_lst[0],
                labelStyle={'display': 'inline-block'} if is_inline else None)) 
开发者ID:negrinho,项目名称:deep_architect,代码行数:13,代码来源:main.py

示例3: generate_layout

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import RadioItems [as 别名]
def generate_layout():
    expensive_data = compute_expensive_data()
    return html.Div([
        html.H3('Last updated at: ' + expensive_data),
        html.Div(id='flask-cache-memoized-children'),
        dcc.RadioItems(
            id='flask-cache-memoized-dropdown',
            options=[
                {'label': 'Option {}'.format(i), 'value': 'Option {}'.format(i)}
                for i in range(1, 4)
            ],
            value='Option 1'
        ),
        html.Div('Results are cached for {} seconds'.format(timeout))
    ]) 
开发者ID:plotly,项目名称:dash-recipes,代码行数:17,代码来源:dash-cache-layout.py

示例4: NamedInlineRadioItems

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import RadioItems [as 别名]
def NamedInlineRadioItems(name, short, options, val, **kwargs):
    return html.Div(
        id=f'div-{short}',
        style=_merge({
            'display': 'block',
            'margin-bottom': '5px',
            'margin-top': '5px'
        }, kwargs.get('style', {})),
        children=[
            f'{name}:',
            dcc.RadioItems(
                id=f'radio-{short}',
                options=options,
                value=val,
                labelStyle={
                    'display': 'inline-block',
                    'margin-right': '7px',
                    'font-weight': 300
                },
                style={
                    'display': 'inline-block',
                    'margin-left': '7px'
                }
            )
        ],
        **_omit(['style'], kwargs)
    )


# Custom Image Components 
开发者ID:plotly,项目名称:dash-image-processing,代码行数:32,代码来源:dash_reusable_components.py

示例5: NamedRadioItems

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import RadioItems [as 别名]
def NamedRadioItems(name, **kwargs):
    return html.Div(
        style={'padding': '20px 10px 25px 4px'},
        children=[
            html.P(children=f'{name}:'),
            dcc.RadioItems(**kwargs)
        ]
    )


# Non-generic 
开发者ID:plotly,项目名称:dash-svm,代码行数:13,代码来源:dash_reusable_components.py

示例6: NamedRadioItems

# 需要导入模块: import dash_core_components [as 别名]
# 或者: from dash_core_components import RadioItems [as 别名]
def NamedRadioItems(name, **kwargs):
    return html.Div(
        style={'padding': '20px 10px 25px 4px'},
        children=[
            html.P(children=f'{name}:'),
            dcc.RadioItems(**kwargs)
        ]
    ) 
开发者ID:plotly,项目名称:dash-cytoscape,代码行数:10,代码来源:dash_reusable_components.py


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