當前位置: 首頁>>代碼示例>>Python>>正文


Python dash_html_components.I屬性代碼示例

本文整理匯總了Python中dash_html_components.I屬性的典型用法代碼示例。如果您正苦於以下問題:Python dash_html_components.I屬性的具體用法?Python dash_html_components.I怎麽用?Python dash_html_components.I使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在dash_html_components的用法示例。


在下文中一共展示了dash_html_components.I屬性的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: build_mapbox_token_children

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import I [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

示例2: build_error

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import I [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

示例3: build_proj_hover_children

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import I [as 別名]
def build_proj_hover_children(proj):
    if proj is None:
        return None
    return [
        html.I(className="ico-help-outline", style=dict(color="white")),
        html.Div(
            [html.Div(proj), html.Img(src=build_img_src(proj))],
            className="hoverable__content",
            style=dict(width="auto"),
        ),
    ] 
開發者ID:man-group,項目名稱:dtale,代碼行數:13,代碼來源:layout.py

示例4: build_loc_mode_hover_children

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import I [as 別名]
def build_loc_mode_hover_children(loc_mode):
    if loc_mode is None:
        return None
    loc_mode_cfg = LOC_MODE_INFO[loc_mode]
    url, examples, desc = (loc_mode_cfg.get(p) for p in ["url", "examples", "desc"])
    body = []
    if url is not None:
        body.append(
            html.Div([html.Span("View", className="mr-3"), loc_mode_cfg["url"]])
        )
    if examples is not None:
        body.append(
            html.Ul(
                [
                    html.Li(e, style={"listStyleType": "disc"}, className="mb-3")
                    for e in loc_mode_cfg["examples"]
                ],
                className="pt-3 mb-0",
            )
        )
    if desc is not None:
        body.append(html.Span(desc))
    return [
        html.I(className="ico-help-outline", style=dict(color="white")),
        html.Div(
            body,
            className="hoverable__content build-code",
            style=dict(width="auto", whiteSpace="nowrap", left="-2em", top="auto"),
        ),
    ] 
開發者ID:man-group,項目名稱:dtale,代碼行數:32,代碼來源:layout.py

示例5: build_map_options

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import I [as 別名]
def build_map_options(
    df, type="choropleth", loc=None, lat=None, lon=None, map_val=None
):
    dtypes = get_dtypes(df)
    cols = sorted(dtypes.keys())
    float_cols, str_cols, num_cols = [], [], []
    for c in cols:
        dtype = dtypes[c]
        classification = classify_type(dtype)
        if classification == "S":
            str_cols.append(c)
            continue
        if classification in ["F", "I"]:
            num_cols.append(c)
            if classification == "F":
                float_cols.append(c)

    lat_options = [
        build_option(c) for c in float_cols if c not in build_selections(lon, map_val)
    ]
    lon_options = [
        build_option(c) for c in float_cols if c not in build_selections(lat, map_val)
    ]
    loc_options = [
        build_option(c) for c in str_cols if c not in build_selections(map_val)
    ]

    if type == "choropleth":
        val_options = [
            build_option(c) for c in num_cols if c not in build_selections(loc)
        ]
    else:
        val_options = [
            build_option(c) for c in num_cols if c not in build_selections(lon, lat)
        ]
    return loc_options, lat_options, lon_options, val_options 
開發者ID:man-group,項目名稱:dtale,代碼行數:38,代碼來源:layout.py

示例6: fa

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import I [as 別名]
def fa(className):
    """A convenience component for adding Font Awesome icons"""
    return html.I(className=className) 
開發者ID:ned2,項目名稱:slapdash,代碼行數:5,代碼來源:components.py


注:本文中的dash_html_components.I屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。