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


Python dash_html_components.H1屬性代碼示例

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


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

示例1: getLayout

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import H1 [as 別名]
def getLayout():
    return html.Div([
        html.H1(id='Title1',children='Multiple intervals in a single page',style={'text-align':'center'}),
        html.Div(id='Title2', children='''
        Test multiple intervals in a single page.
        ''',style={'margin-bottom':'50px', 'text-align':'center'}),
        html.Div('Div1',id='div1'),
        html.Div('Div2',id='div2'),
        html.Div('Div3',id='div3'),
        dcc.Interval(
            id='interval-component-1',
            interval=500 # in milliseconds
        ),
        dcc.Interval(
            id='interval-component-2',
            interval=300 # in milliseconds
        ),
        dcc.Interval(
            id='interval-component-3',
            interval=400 # in milliseconds
        )
    ]) 
開發者ID:plotly,項目名稱:dash-recipes,代碼行數:24,代碼來源:multiple-intervals.py

示例2: plot_bar

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import H1 [as 別名]
def plot_bar(data):
	app.layout = html.Div(children=[html.H1(children='CM PT'), html.Div(children='''History.'''),

	dcc.Graph(
		figure=go.Figure(
		data = data,
		layout=go.Layout(title='Streams', showlegend=False, barmode='stack', margin=go.Margin(l=200, r=0, t=40, b=20))),
	style={'height': 300},
	id='my-graph')
	]) 
開發者ID:plotly,項目名稱:dash-recipes,代碼行數:12,代碼來源:dash-plot.py

示例3: layout

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import H1 [as 別名]
def layout():
    divs = divs_list()

    return [html.Div([
        html.H1('Example'),

        html.Div(divs, id='model-k2-divs'),
    ], style={'maxWidth': '720px', 'margin': '0 auto'}, id='example')] 
開發者ID:plotly,項目名稱:dash-recipes,代碼行數:10,代碼來源:dash-callback-factory.py

示例4: display_content

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import H1 [as 別名]
def display_content(selected_tab):
    return html.Div([
          html.H1(selected_tab),
          dcc.Graph(id='graph', figure=generate_figure(selected_tab))
    ]) 
開發者ID:plotly,項目名稱:dash-recipes,代碼行數:7,代碼來源:tabs-and-intervals.py

示例5: layout

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import H1 [as 別名]
def layout(self) -> html.Div:
        return html.Div(
            [
                html.H1(self.title),
                html.Button(
                    id=self.uuid("submit-button"), n_clicks=0, children="Submit"
                ),
                html.Div(id=self.uuid("output-state")),
            ]
        ) 
開發者ID:equinor,項目名稱:webviz-config,代碼行數:12,代碼來源:_example_plugin.py

示例6: layout

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import H1 [as 別名]
def layout(self) -> html.H1:
        return html.H1(self.title) 
開發者ID:equinor,項目名稱:webviz-config,代碼行數:4,代碼來源:_example_data_download.py

示例7: serve_layout

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import H1 [as 別名]
def serve_layout():
    return html.Div(
        [
            dcc.Interval(interval=5 * 1000, id="interval"),
            html.H1("Redis, Celery, and Periodic Updates"),
            html.Div(id="status"),
            dcc.Dropdown(
                id="dropdown",
                options=[{"value": i, "label": i} for i in ["LA", "NYC", "MTL"]],
                value="LA",
            ),
            dcc.Graph(id="graph"),
        ]
    ) 
開發者ID:plotly,項目名稱:dash-redis-celery-periodic-updates,代碼行數:16,代碼來源:app.py

示例8: make_brand

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import H1 [as 別名]
def make_brand(**kwargs):
    return html.Header(
        className="brand",
        children=dcc.Link(
            href=get_url(""),
            children=html.H1([fa("far fa-chart-bar"), server.config["TITLE"]]),
        ),
        **kwargs,
    ) 
開發者ID:ned2,項目名稱:slapdash,代碼行數:11,代碼來源:components.py

示例9: create_doc_page

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import H1 [as 別名]
def create_doc_page(examples, component_names, component_hyphenated, component_examples=None):
    '''Generates a documentation page for a component.

    :param (dict[object]) examples: A dictionary that contains the
    loaded examples for all components.
    :param (dict[list]) component_names: A dictionary defining which
    components are React components, and which are Python
    components. The keys in the dictionary are 'react' and 'python',
    and the values for each are lists containing the names of the
    components that belong to each category.
    :param (string) component_hyphenated: The name of the component in snake
    case, with underscores (_) replaced with dashes (-).

    :rtype (object): A div containing the contents of the component's
    documentation page.
    '''
    component_name = component_hyphenated\
        .replace('-', ' ')\
        .title()\
        .replace(' ', '')\
        .replace('.Py', '')

    if component_examples is None:
        component_examples = []
    component_examples = create_examples(component_examples)

    if component_name == 'Molecule3DViewer':
        component_name = 'Molecule3dViewer'
    elif component_name == 'Molecule2DViewer':
        component_name = 'Molecule2dViewer'

    return html.Div(
        children=[
            html.H1('{} Examples and Reference'.format(
                component_name))] +
        create_default_example(component_name,
                               examples[component_hyphenated],
                               styles,
                               component_hyphenated.replace('.py', '')) +
        component_examples +
        [rc.ComponentReference(
            component_name,
            lib=dash_bio)]
    ) 
開發者ID:plotly,項目名稱:dash-docs,代碼行數:46,代碼來源:utils.py

示例10: component_list

# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import H1 [as 別名]
def component_list(
        package, content_module, base_url, import_alias,
        component_library, escape_tags=False,
        ad='dash-enterprise-kubernetes.jpg',
        adhref='https://plotly.com/dash/kubernetes/?utm_source=docs&utm_medium=sidebar&utm_campaign=june&utm_content=kubernetes'):
    return [
        {
            'url': tools.relpath('/{}/{}'.format(base_url, component.lower())),
            'name': '{}.{}'.format(import_alias, component),
            'description': ' '.join([
                'Official examples and reference documentation for {name}.',
                '{which_library}'
            ]).format(
                name='{}.{}'.format(import_alias, component),
                component_library=component_library,
                which_library=(
                    '{name} is a {component_library} component.'.format(
                        name='{}.{}'.format(import_alias, component),
                        component_library=component_library,
                    ) if component_library != import_alias else ''
                )
            ).strip(),
            'content': (
                getattr(content_module, component)
                if (content_module is not None and
                    hasattr(content_module, component))
                else html.Div([
                    html.H1(html.Code('{}.{}'.format(
                        import_alias,
                        component
                    ))),
                    html.H2('Reference & Documentation'),
                    rc.Markdown(
                        getattr(package, component).__doc__,
                        escape_tags=escape_tags
                    ),
                ])
            ),
            'ad': ad,
            'adhref': adhref
        } for component in sorted(dir(package))
        if not component.startswith('_') and
        component[0].upper() == component[0]
    ] 
開發者ID:plotly,項目名稱:dash-docs,代碼行數:46,代碼來源:chapter_index.py


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