當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。