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