当前位置: 首页>>代码示例>>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;未经允许,请勿转载。