当前位置: 首页>>代码示例>>Python>>正文


Python dash_html_components.H3属性代码示例

本文整理汇总了Python中dash_html_components.H3属性的典型用法代码示例。如果您正苦于以下问题:Python dash_html_components.H3属性的具体用法?Python dash_html_components.H3怎么用?Python dash_html_components.H3使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在dash_html_components的用法示例。


在下文中一共展示了dash_html_components.H3属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: render_content

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import H3 [as 别名]
def render_content(tab):
    if tab == 'tab-1':
        return html.Div([
            html.H3('Tab content 1')
        ])
    elif tab == 'tab-2':
        return html.Div([
            html.H3('Tab content 2')
        ])
    elif tab == 'tab-3':
        return html.Div([
            html.H3('Tab content 3')
        ])
    elif tab == 'tab-4':
        return html.Div([
            html.H3('Tab content 4')
        ]) 
开发者ID:plotly,项目名称:dash-docs,代码行数:19,代码来源:tabs_styled_with_inline.py

示例2: generate_layout

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import H3 [as 别名]
def generate_layout():
    expensive_data = compute_expensive_data()
    return html.Div([
        html.H3('Last updated at: ' + expensive_data),
        html.Div(id='flask-cache-memoized-children'),
        dcc.RadioItems(
            id='flask-cache-memoized-dropdown',
            options=[
                {'label': 'Option {}'.format(i), 'value': 'Option {}'.format(i)}
                for i in range(1, 4)
            ],
            value='Option 1'
        ),
        html.Div('Results are cached for {} seconds'.format(timeout))
    ]) 
开发者ID:plotly,项目名称:dash-recipes,代码行数:17,代码来源:dash-cache-layout.py

示例3: update_text

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import H3 [as 别名]
def update_text(hoverData):
    s = df[df['storenum'] == hoverData['points'][0]['customdata']]
    return html.H3(
        'The {}, {} {} opened in {}'.format(
            s.iloc[0]['STRCITY'],
            s.iloc[0]['STRSTATE'],
            s.iloc[0]['type_store'],
            s.iloc[0]['YEAR']
        )
    ) 
开发者ID:plotly,项目名称:dash-recipes,代码行数:12,代码来源:walmart-hover.py

示例4: create_examples

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import H3 [as 别名]
def create_examples(
        examples_data
):
    examples = []
    for example in examples_data:
        examples += [
            html.H3(example['param_name'].title()),
            rc.Markdown(example['description']),
            rc.ComponentBlock(example['code']),
            html.Hr()
        ]
    return examples 
开发者ID:plotly,项目名称:dash-docs,代码行数:14,代码来源:utils.py

示例5: render_content

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import H3 [as 别名]
def render_content(tab):
    if tab == 'tab-1':
        return html.Div([
            html.H3('Tab content 1')
        ])
    elif tab == 'tab-2':
        return html.Div([
            html.H3('Tab content 2')
        ]) 
开发者ID:plotly,项目名称:dash-docs,代码行数:11,代码来源:tabs_callback.py

示例6: render_content

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import H3 [as 别名]
def render_content(tab):
    if tab == 'tab-1-example-graph':
        return html.Div([
            html.H3('Tab content 1'),
            dcc.Graph(
                id='graph-1-tabs',
                figure={
                    'data': [{
                        'x': [1, 2, 3],
                        'y': [3, 1, 2],
                        'type': 'bar'
                    }]
                }
            )
        ])
    elif tab == 'tab-2-example-graph':
        return html.Div([
            html.H3('Tab content 2'),
            dcc.Graph(
                id='graph-2-tabs',
                figure={
                    'data': [{
                        'x': [1, 2, 3],
                        'y': [5, 10, 6],
                        'type': 'bar'
                    }]
                }
            )
        ]) 
开发者ID:plotly,项目名称:dash-docs,代码行数:31,代码来源:tabs_callback_graph.py

示例7: create_default_example

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import H3 [as 别名]
def create_default_example(
        component_name,
        example_code,
        styles,
        component_hyphenated
):
    '''Generate a default example for the component-specific page.

    :param (str) component_name: The name of the component as it is
    defined within the package.
    :param (str) example_code: The code for the default example.
    :param (dict) styles: The styles to be applied to the code
    container.

    :rtype (list[object]): The children of the layout for the default
    example.
    '''

    return [
        rc.Markdown('See [{} in action](http://dash-gallery.plotly.host/dash-{}).'.format(
            component_name,
            component_hyphenated
        )),

        html.Hr(),

        html.H3("Default {}".format(
            component_name
        )),
        html.P("An example of a default {} component without \
        any extra properties.".format(
            component_name
        )),
        rc.Markdown(
            example_code[0]
        ),
        html.Div(
            example_code[1],
            className='example-container'
        ),
        html.Hr()
    ] 
开发者ID:plotly,项目名称:dash-docs,代码行数:44,代码来源:utils.py

示例8: update_graph

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import H3 [as 别名]
def update_graph(tickers):
    graphs = []
    for i, ticker in enumerate(tickers):
        try:
            df = pyEX.chartDF(str(ticker), '6m').reset_index()
        except:
            graphs.append(html.H3(
                'Data is not available for {}, please retry later.'.format(ticker),
                style={'marginTop': 20, 'marginBottom': 20}
            ))
            continue

        candlestick = {
            'x': df['date'],
            'open': df['open'],
            'high': df['high'],
            'low': df['low'],
            'close': df['close'],
            'type': 'candlestick',
            'name': ticker,
            'legendgroup': ticker,
            'increasing': {'line': {'color': colorscale[0]}},
            'decreasing': {'line': {'color': colorscale[1]}}
        }
        bb_bands = bbands(df.close)
        bollinger_traces = [{
            'x': df['date'], 'y': y,
            'type': 'scatter', 'mode': 'lines',
            'line': {'width': 1, 'color': colorscale[(i*2) % len(colorscale)]},
            'hoverinfo': 'none',
            'legendgroup': ticker,
            'showlegend': True if i == 0 else False,
            'name': '{} - bollinger bands'.format(ticker)
        } for i, y in enumerate(bb_bands)]
        graphs.append(dcc.Graph(
            id=ticker,
            figure={
                'data': [candlestick] + bollinger_traces,
                'layout': {
                    'margin': {'b': 0, 'r': 10, 'l': 60, 't': 0},
                    'legend': {'x': 0}
                }
            }
        ))

    return graphs 
开发者ID:timkpaine,项目名称:lantern,代码行数:48,代码来源:app.py


注:本文中的dash_html_components.H3属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。