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


Python dash_html_components.Span方法代码示例

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


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

示例1: display_page

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import Span [as 别名]
def display_page(pathname):
    return html.Div([
        html.Div([
            html.Span(
                dcc.Link(link_mapping['/'], href="/") if pathname != '/' else 'Exhibit A',
                style=styles['link']
            ),

            html.Span(
                dcc.Link(link_mapping['/exhibit-b'], href="/exhibit-b") if pathname != '/exhibit-b' else 'Exhibit B',
                style=styles['link']
            ),

            html.Span(
                dcc.Link(link_mapping['/exhibit-c'], href="/exhibit-c") if pathname != '/exhibit-c' else 'Exhibit C',
                style=styles['link']
            )

        ]),

        dcc.Markdown('### {}'.format(link_mapping[pathname])),
    ]) 
开发者ID:plotly,项目名称:dash-recipes,代码行数:24,代码来源:multi-page-dropdown.py

示例2: well_layout

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

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import Span [as 别名]
def seismic_layout(self):
        if self.segyfiles:
            return html.Div(
                style=self.set_style(marginTop="20px")
                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
                            ],
                            value=self.segyfiles[0],
                            clearable=False,
                        ),
                    ]
                ),
            )
        return html.Div(
            style={"visibility": "hidden"}, children=dcc.Dropdown(id=self.ids("cube"))
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:26,代码来源:_well_cross_section_fmu.py

示例6: marginal_log_layout

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

示例7: plot_selector

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

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

示例10: well_layout

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

示例11: seismic_layout

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

示例12: layout

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import Span [as 别名]
def layout(self):
        return html.Div(
            id=self.ids("layout"),
            children=[
                html.Span("Parameter distribution:", style={"font-weight": "bold"}),
                html.Div(
                    style=self.set_grid_layout("8fr 1fr 2fr"),
                    children=[
                        dcc.Dropdown(
                            id=self.ids("parameter"),
                            options=[
                                {"value": col, "label": col}
                                for col in self.parameter_columns
                            ],
                            value=self.parameter_columns[0],
                            clearable=False,
                        ),
                        self.make_buttons(self.ids("prev-btn"), self.ids("next-btn")),
                    ],
                ),
                wsc.PriorPosteriorDistribution(id=self.ids("graph")),
            ],
        ) 
开发者ID:equinor,项目名称:webviz-subsurface,代码行数:25,代码来源:_parameter_distribution.py

示例13: build_mapbox_token_children

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import Span [as 别名]
def build_mapbox_token_children():
    from dtale.charts.utils import get_mapbox_token

    msg = "To access additional styles enter a token here..."
    if get_mapbox_token() is None:
        msg = "Change your token here..."
    return [
        html.I(className="ico-help-outline", style=dict(color="white")),
        html.Div(
            [
                html.Span("Mapbox Access Token:"),
                dcc.Input(
                    id="mapbox-token-input",
                    type="text",
                    placeholder=msg,
                    className="form-control",
                    value="",
                    style={"lineHeight": "inherit"},
                ),
            ],
            className="hoverable__content",
            style=dict(width="20em", right="-1.45em"),
        ),
    ] 
开发者ID:man-group,项目名称:dtale,代码行数:26,代码来源:layout.py

示例14: build_error

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import Span [as 别名]
def build_error(error, tb):
    """
    Returns error/traceback information in standard component with styling

    :param error: execption message
    :type error: str
    :param tb: tracebackF
    :type tb: str
    :return: error component
    :rtype: :dash:`dash_html_components.Div <dash-html-components/div>`
    """
    if isinstance(error, ChartBuildingError):
        if error.details:
            tb = error.details
        error = error.error
    return html.Div(
        [
            html.I(className="ico-error"),
            html.Span(str(error)),
            html.Div(html.Pre(str(tb)), className="traceback"),
        ],
        className="dtale-alert alert alert-danger",
    ) 
开发者ID:man-group,项目名称:dtale,代码行数:25,代码来源:layout.py

示例15: create_backlinks

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import Span [as 别名]
def create_backlinks(pathname):
    parts = pathname.strip('/').split('/')
    links = [
        dcc.Link('Home', href='/')
    ]
    for i, part in enumerate(parts[:-1]):
        href='/' + '/'.join(parts[:i + 1])
        name = chapter_index.URL_TO_BREADCRUMB_MAP.get(href, '? {} ?'.format(href))
        links += [
            html.Span(' > '),
            dcc.Link(name, href=href)
        ]
    current_chapter_name = chapter_index.URL_TO_BREADCRUMB_MAP.get(
        pathname.rstrip('/'), '? {} ?'.format(pathname)
    )
    links += [html.Span(' > ' + current_chapter_name)]
    return links 
开发者ID:plotly,项目名称:dash-docs,代码行数:19,代码来源:run.py


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