本文整理匯總了Python中dash_core_components.Interval方法的典型用法代碼示例。如果您正苦於以下問題:Python dash_core_components.Interval方法的具體用法?Python dash_core_components.Interval怎麽用?Python dash_core_components.Interval使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類dash_core_components
的用法示例。
在下文中一共展示了dash_core_components.Interval方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: getLayout
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Interval [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
)
])
示例2: layout
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Interval [as 別名]
def layout():
return html.Div([
html.Button('Run Process', id='button'),
dcc.Interval(id='interval', interval=500),
html.Div(id='lock'),
html.Div(id='output'),
])
示例3: serve_layout
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Interval [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"),
]
)