本文整理匯總了Python中dash_core_components.Input方法的典型用法代碼示例。如果您正苦於以下問題:Python dash_core_components.Input方法的具體用法?Python dash_core_components.Input怎麽用?Python dash_core_components.Input使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類dash_core_components
的用法示例。
在下文中一共展示了dash_core_components.Input方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: display_output
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def display_output(n_clicks):
print('display_output ' + str(n_clicks))
if n_clicks == 0:
return ''
return html.Div([
html.Div([
dcc.Input(
value='Input {}'.format(i),
id='input-{}'.format(i)
)
for i in range(10)
]),
dt.DataTable(
rows=[{'Loading': ''}],
id='new-table'),
html.Div(id='dynamic-output')
])
示例2: build_mapbox_token_children
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def build_mapbox_token_children():
from dtale.charts.utils import get_mapbox_token
msg = "To access additional styles enter a token here..."
if get_mapbox_token() is None:
msg = "Change your token here..."
return [
html.I(className="ico-help-outline", style=dict(color="white")),
html.Div(
[
html.Span("Mapbox Access Token:"),
dcc.Input(
id="mapbox-token-input",
type="text",
placeholder=msg,
className="form-control",
value="",
style={"lineHeight": "inherit"},
),
],
className="hoverable__content",
style=dict(width="20em", right="-1.45em"),
),
]
示例3: generate_liveOut_layout
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def generate_liveOut_layout():
'Generate the layout per-app, generating each tine a new uuid for the state_uid argument'
return html.Div([
dpd.Pipe(id="named_count_pipe",
value=None,
label="named_counts",
channel_name="live_button_counter"),
html.Div(id="internal_state",
children="No state has been computed yet",
style={'display':'none'}),
dcc.Graph(id="timeseries_plot"),
dcc.Input(value=str(uuid.uuid4()),
id="state_uid",
style={'display':'none'},
)
])
示例4: get_input
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def get_input(self, attribute_name):
return Input(self.full_name, attribute_name)
示例5: __init__
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def __init__(self, parent_name, local_name, placeholder_text):
Component.__init__(self, parent_name, local_name)
self._register(
dcc.Input(id=self.full_name,
placeholder=placeholder_text,
type='text',
value='',
style={'width': '100%'}))
# value is an input attribute to read from callbacks.
示例6: display_output
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def display_output(n_clicks):
print('display_output ' + str(n_clicks))
if n_clicks == 0:
return ''
return html.Div([
html.Div([
dcc.Input(
value='Input {}'.format(i),
id='input-{}'.format(i)
)
for i in range(10)
]),
html.Div(id='dynamic-output')
])
示例7: display_output
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def display_output(value):
if value == 'Hide':
return ''
return html.Div([
html.Div([
dcc.Input(value='Input {}'.format(i), id='input-{}'.format(i))
for i in range(10)
]),
html.Div(id='dynamic-output')
])
示例8: intersection_option
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def intersection_option(self):
options = [
{"label": "Keep zoom state", "value": "keep_zoom_state"},
{"label": "Show surface fill", "value": "show_surface_fill"},
]
value = ["show_surface_fill"]
if self.segyfiles:
options.append({"label": "Show seismic", "value": "show_seismic"})
if self.zonelog is not None:
options.append({"label": "Show zonelog", "value": "show_zonelog"})
value.append("show_zonelog")
return html.Div(
style=self.set_style(marginTop="20px"),
children=[
html.Label("Intersection settings", style={"font-weight": "bold"}),
html.Label("Sampling"),
dcc.Input(
id=self.ids("sampling"),
debounce=True,
type="number",
value=self.sampling,
),
html.Label("Extension"),
dcc.Input(
id=self.ids("nextend"),
debounce=True,
type="number",
value=self.nextend,
),
dcc.Checklist(id=self.ids("options"), options=options, value=value),
],
)
示例9: well_options
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def well_options(self):
return html.Div(
style={"marginLeft": "20px", "marginRight": "0px", "marginBotton": "0px"},
children=[
html.Div(
children=html.Label(
children=[
html.Span("Sampling:", style={"font-weight": "bold"}),
dcc.Input(
id=self.ids("sampling"),
debounce=True,
type="number",
value=self.sampling,
),
]
)
),
html.Div(
children=html.Label(
children=[
html.Span("Nextend:", style={"font-weight": "bold"}),
dcc.Input(
id=self.ids("nextend"),
debounce=True,
type="number",
value=self.nextend,
),
]
)
),
],
)
示例10: simple_app_layout
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def simple_app_layout(
component
):
return [
dcc.Input(id='prop-name'),
dcc.Input(id='prop-value'),
html.Div(id='pass-fail-div'),
html.Button('Submit', id='submit-prop-button'),
component
]
示例11: nested_component_layout
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def nested_component_layout(
component
):
return [
dcc.Input(id='prop-name'),
dcc.Input(id='prop-value'),
html.Div(id='pass-fail-div'),
html.Button('Submit', id='submit-prop-button'),
dcc.Graph(
id='test-graph',
figure=component
)
]
示例12: user_interactions_callback
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def user_interactions_callback(
app,
dash_duo,
component_id,
prop_name
):
@app.callback(
dash.dependencies.Output('interaction-results', 'children'),
[Input(component_id, prop_name)]
)
def update_interaction_info(result):
return json.dumps(result)
dash_duo.start_server(app)
dash_duo.wait_for_element('#' + component_id)
示例13: update_output
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def update_output(n_clicks, input1, input2):
return u'''
The Button has been pressed {} times,
Input 1 is "{}",
and Input 2 is "{}"
'''.format(n_clicks, input1, input2)
示例14: update_output
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def update_output(input1, input2):
return u'Input 1 is "{}" and Input 2 is "{}"'.format(input1, input2)
示例15: update_output
# 需要導入模塊: import dash_core_components [as 別名]
# 或者: from dash_core_components import Input [as 別名]
def update_output(input1, input2):
return u'Input 1 {} and Input 2 {}'.format(input1, input2)