當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。