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


Python dash_html_components.P屬性代碼示例

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


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

示例1: divs_list

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import P [as 別名]
def divs_list():
    return [html.Div([
        dcc.Markdown(
            '',
            id='model-{}-markdown'.format(id)
        ),
        html.P(
            '',
            id='model-{}-p'.format(id)
        ),
        html.Button(
            'Delete',
            id='model-{}-delete-button'.format(id),
            style={'width': '49%'}
        ),
        html.Button(
            'Start/Stop',
            id='model-{}-toggle-button'.format(id),
            style={'marginLeft': '2%', 'width': '49%'}
        ),

        html.Hr()
    ], id='model-k2-{}'.format(id)) for id in IDS] 
開發者ID:plotly,項目名稱:dash-recipes,代碼行數:25,代碼來源:dash-callback-factory.py

示例2: layout

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

示例3: __init__

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import P [as 別名]
def __init__(self, parent_name, local_name, str_value):
        Component.__init__(self, parent_name, local_name)
        self._register(html.P(id=self.full_name, children=str_value))
        # children is perhaps useful if we want to change the text. 
開發者ID:negrinho,項目名稱:deep_architect,代碼行數:6,代碼來源:main.py

示例4: plot_option_layout

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import P [as 別名]
def plot_option_layout(self) -> List[html.Div]:
        """Renders a dropdown widget for each plot option"""
        divs = []
        # The plot type dropdown is handled separate
        divs.append(
            html.Div(
                style=self.style_options_div,
                children=[
                    html.H4("Set plot options"),
                    html.P("Plot type"),
                    dcc.Dropdown(
                        id=self.uuid("plottype"),
                        clearable=False,
                        options=[{"label": i, "value": i} for i in self.plots],
                        value=self.plot_options.get("type", "scatter"),
                    ),
                ],
            )
        )
        # Looping through all available plot options
        # and renders a dropdown widget
        for key, arg in self.plot_args.items():
            divs.append(
                html.Div(
                    style=self.style_options_div_hidden,
                    id=self.uuid(f"div-{key}"),
                    children=[
                        html.P(key),
                        dcc.Dropdown(
                            id=self.uuid(f"dropdown-{key}"),
                            clearable=arg["clearable"],
                            options=[{"label": i, "value": i} for i in arg["options"]],
                            value=arg["value"],
                            multi=arg["multi"],
                        ),
                    ],
                )
            )
        return divs 
開發者ID:equinor,項目名稱:webviz-config,代碼行數:41,代碼來源:_table_plotter.py

示例5: make_card_html

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import P [as 別名]
def make_card_html(body, title_text=None, size=12, thresholds=[]):
    background_color = "white"
    value = None
    if type(body[0]) == html.P and body[0].children:
        value = int(body[0].children)

    if value is not None and len(thresholds) == 2:
        good_threshold, bad_threshold = thresholds
        if value >= good_threshold:
            background_color = "palegreen"
        elif value < bad_threshold:
            background_color = "lightsalmon"

    card_html = html.Div(
        [
            html.Div(
                [html.Div(body, className="card-body", style={"background-color": background_color})],
                className="card mb-3 text-center",
            )
        ],
        className=f"col-sm-{size}",
    )

    if title_text is not None:
        title = html.H6(title_text, className="card-title")
        card_html.children[0].children[0].children.insert(0, title)

    return card_html 
開發者ID:DongjunLee,項目名稱:quantified-self,代碼行數:30,代碼來源:dashboard.py

示例6: effective_n_p

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import P [as 別名]
def effective_n_p(trace_info, varname):
    if trace_info.nchains > 1:
        try:
            text = "Effective sample size = {}".format(
                trace_info.effective_n[varname]
            )
        except KeyError:
            text = "Effective sample size not found"
    else:
        text = "Cannot calculate effective sample size with only one chain"

    return html.P(id='univariate-effective-n', children=text) 
開發者ID:AustinRochford,項目名稱:webmc3,代碼行數:14,代碼來源:components.py

示例7: gelman_rubin_p

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import P [as 別名]
def gelman_rubin_p(trace_info, varname):
    if trace_info.nchains > 1:
        text = u"Gelman-Rubin R̂ = {:.4f}".format(
            trace_info.gelman_rubin[varname]
        )
    else:
        text = "Cannot calculate Gelman-Rubin statistic with only one chain"

    return html.P(id='univariate-gelman-rubin', children=text) 
開發者ID:AustinRochford,項目名稱:webmc3,代碼行數:11,代碼來源:components.py

示例8: createThoughts

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import P [as 別名]
def createThoughts(list_of_thoughts):
    paragraph_list = []
    ## skipping the folder_names
    for thought in list_of_thoughts[1::2]:
        paragraph = html.P(thought)
        paragraph_list.append(paragraph)
    return paragraph_list 
開發者ID:bbli,項目名稱:ml_board,代碼行數:9,代碼來源:utils.py

示例9: NamedSlider

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import P [as 別名]
def NamedSlider(name, **kwargs):
    return html.Div(
        style={'padding': '10px 10px 15px 4px'},
        children=[
            html.P(f'{name}:'),
            html.Div(dcc.Slider(**kwargs), style={'margin-left': '6px'})
        ]
    ) 
開發者ID:plotly,項目名稱:dash-regression,代碼行數:10,代碼來源:dash_reusable_components.py

示例10: NamedDropdown

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import P [as 別名]
def NamedDropdown(name, **kwargs):
    return html.Div([
        html.P(f'{name}:', style={'margin-left': '3px'}),
        dcc.Dropdown(**kwargs)
    ]) 
開發者ID:plotly,項目名稱:dash-regression,代碼行數:7,代碼來源:dash_reusable_components.py

示例11: NamedSlider

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import P [as 別名]
def NamedSlider(name, **kwargs):
    return html.Div(
        style={'padding': '20px 10px 25px 4px'},
        children=[
            html.P(f'{name}:'),
            html.Div(
                style={'margin-left': '6px'},
                children=dcc.Slider(**kwargs)
            )
        ]
    ) 
開發者ID:plotly,項目名稱:dash-svm,代碼行數:13,代碼來源:dash_reusable_components.py

示例12: NamedDropdown

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import P [as 別名]
def NamedDropdown(name, **kwargs):
    return html.Div(
        style={'margin': '10px 0px'},
        children=[
            html.P(
                children=f'{name}:',
                style={'margin-left': '3px'}
            ),

            dcc.Dropdown(**kwargs)
        ]
    ) 
開發者ID:plotly,項目名稱:dash-svm,代碼行數:14,代碼來源:dash_reusable_components.py

示例13: NamedRadioItems

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

示例14: page_not_found

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import P [as 別名]
def page_not_found(pathname):
    return _html.P("No page '{}'".format(pathname)) 
開發者ID:ned2,項目名稱:slapdash,代碼行數:4,代碼來源:__init__.py

示例15: NamedRadioItems

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import P [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_html_components.P屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。