def params_line(e): data = params_dict[e] if data['element'] == 'input': if 'step' in data: return dbc.InputGroup([ dbc.InputGroupText(e, className='par-input-text no-border'), dbc.Input(id=f'par_{e}', type=data['type'], step=data['step'], className='par-input-field no-border') ], className='no-border') else: return dbc.InputGroup([ dbc.InputGroupText(e, className='par-input-text no-border'), dbc.Input(id=f'par_{e}', type=data['type'], className='par-input-field no-border') ], className='no-border') else: return dbc.InputGroup([ dbc.InputGroupText(e, className='par-input-text no-border'), dbc.Select(id=f'par_{e}', options=opt_list(data['options']), className='par-select-field no-border') ], className='no-border')
children=[ html.Div(className='jumbotron', children=[ dcc.Markdown(''' # COVID-19 Dashboard All information is pulled from the Johns Hopkins University [Github Page](https://www.github.com/CSSEGISandData)''' ) ]), html.Div(id='select_chart_theme_output'), dbc.Row( dbc.Col( dbc.Card( dbc.CardBody([ dbc.Col( dbc.InputGroup([ dbc.InputGroupText("Select Country"), dbc.Select(id='filter_by_country', options=[{ 'label': i, 'value': i } for i in dataset.filter], value='Germany') ])), dbc.Col( dbc.InputGroup([ dbc.InputGroupText("Select Chart Theme"), dbc.Select(id='select_chart_theme', options=[{ 'label': i, 'value': i } for i in dataset.chart_themes],
id="rubik-button-reset", children="Reset", n_clicks=0, color="primary", disabled=False, ), dbc.Select( id="rubik-select-dim", value=3, options=[ {"label":f"{n}x{n} Cube", "value":n} for n in range(1, 6) ], ), dbc.InputGroupText( children="On face click:", ), dbc.Select( id="rubik-select-layer", value=1, options=[ {"label":f"Rotate {hu.ordinal(layer)} layer", "value":layer} for layer in range(1, 4) ], ), dbc.Button( id="rubik-button-scramble", children="Scramble", n_clicks=0, color="primary", disabled=True,
in many of nature'sdesigns. Here, an example is given by modelling an arrangement of **sunflower seeds** using a spiral; at every $\phi$ turns of the spiral a seed is grown. """), dbc.InputGroup( size="sm", children=[ dbc.Button( id="button-geometry-spiral-reset", children="Reset", n_clicks=0, color="primary", ), dbc.InputGroupText( children="Seed Count:", ), dbc.Input( id="input-geometry-spiral-snum", value=300, type="numeric", disabled=True, ), dbc.InputGroupText( children="Rotation Space:", ), dbc.Input( id="input-geometry-spiral-tmin", value="(1+5**0.5)/2", ), dbc.Input(
[ dbc.Button("To the left!", color="danger"), dbc.Input(type="text"), ], className="my-3", ), dbc.InputGroup( [ dbc.Input(type="text"), dbc.Button("To the right!", color="success"), ], className="mb-3", ), dbc.InputGroup( [ dbc.InputGroupText("@"), dbc.Input(type="text", placeholder="Enter username"), ], className="mb-3", ), dbc.InputGroup( [dbc.InputGroupText("Large"), dbc.Input()], size="lg", className="my-3", ), dbc.InputGroup([dbc.InputGroupText("Default"), dbc.Input()], className="my-3"), dbc.InputGroup( [dbc.InputGroupText("Small"),
def input_prefix(name: str): """For getting a nice label before inputs""" return dbc.InputGroupText(name)
# LAYOUT # Dash packages. import dash import dash_ace as dac from dash import dcc from dash import html as dhc import dash.exceptions as dex import dash.dependencies as ddp import dash_bootstrap_components as dbc app_layout = [ dbc.InputGroup( size="sm", children=[ dbc.InputGroupText(children="Solution:", ), dbc.Select( id="select-solution-number", value=None, options=[{ "label": name.rsplit(sep="_", maxsplit=1)[-1], "value": name } for name, obj in inspect.getmembers( object=sys.modules[__name__], predicate=inspect.isfunction, )], ), dbc.Button( id="button-solution-profile", children="Profile", n_clicks=0,
href="/masst_plus")), ], navbar=True) ], color="light", dark=False, sticky="top", ) DATASELECTION_CARD = [ dbc.CardHeader(html.H5("Data Selection")), dbc.CardBody([ html.H5(children='GNPS Data Selection'), dbc.InputGroup( [ dbc.InputGroupText("Spectrum USI"), dbc.Input(id='usi1', placeholder="Enter GNPS USI", value=""), ], className="mb-3", ), dbc.InputGroup( [ dbc.InputGroupText("Analog Search"), dbc.Select(id="analog_search", options=[ { "label": "Yes", "value": "Yes" }, { "label": "No",
"""), ]), ]), dbc.Card([ dbc.CardHeader([ dbc.InputGroup( size="sm", children=[ dbc.Button( id="button-boids-reset", children="Reset", n_clicks=0, color="primary", disabled=False, ), dbc.InputGroupText("Seperation:"), dbc.Input( id="input-boids-seperation", min=0, placeholder="<Non-negative number>", value=1, disabled=False, ), ], ), ]), dbc.CardBody([ dcc.Graph( id="graph-boids-sim", config={ "displayModeBar": False,
import dash_bootstrap_components as dbc from dash import html input_groups = html.Div([ dbc.InputGroup( [dbc.InputGroupText("@"), dbc.Input(placeholder="Username")], className="mb-3", ), dbc.InputGroup( [ dbc.Input(placeholder="Recipient's username"), dbc.InputGroupText("@example.com"), ], className="mb-3", ), dbc.InputGroup( [ dbc.InputGroupText("$"), dbc.Input(placeholder="Amount", type="number"), dbc.InputGroupText(".00"), ], className="mb-3", ), dbc.InputGroup( [ dbc.InputGroupText("Total:"), dbc.InputGroupText("$"), dbc.Input(placeholder="Amount", type="number"), dbc.InputGroupText(".00"), dbc.InputGroupText("only"),
if unit is None and variable.declaredType is not None: unit = variable.declaredType.unit names.append(variable.name) id = f'variable-{i}' row = dbc.Row([ dbc.Label(variable.name, html_for=id, width=6), dbc.Col( dbc.InputGroup([ dbc.Input(id=id, value=variable.start, style={'text-align': 'right'}), dbc.InputGroupText(unit if unit else " ") ], size="sm"), width=6, ), ], className='mb-2') rows.append(row) states.append(State(id, 'value')) stop_time = None if model_description.defaultExperiment: stop_time = model_description.defaultExperiment.stopTime
"label": period["label"], "value": i } for i, period in enumerate(time_period_data)], value=0, labelClassName="mb-2", ), ], body=True, className="mt-4", ) # ======= InputGroup components start_amount = dbc.InputGroup( [ dbc.InputGroupText("Start Amount $"), dbc.Input( id="starting_amount", placeholder="Min $10", type="number", min=10, value=10000, ), ], className="mb-3", ) start_year = dbc.InputGroup( [ dbc.InputGroupText("Start Year"), dbc.Input( id="start_yr",
import dash_bootstrap_components as dbc from dash import html input_group = html.Div( [ dbc.InputGroup([dbc.InputGroupText("Large"), dbc.Input()], size="lg"), html.Br(), dbc.InputGroup([dbc.InputGroupText("Default"), dbc.Input()]), html.Br(), dbc.InputGroup([dbc.InputGroupText("Small"), dbc.Input()], size="sm"), ] )
dbc.CardHeader([ dcc.Markdown(""" ### The Simulation *** """), dbc.InputGroup( size="sm", children=[ dbc.Button( id="button-gol-clear", children="Clear Cells", n_clicks=0, color="primary", disabled=False, ), dbc.InputGroupText("Rows:"), dbc.Select(id="select-gol-rows", value=default_rows, options=[{ "value": dim, "label": dim } for dim in [10, 25, 50, 75, 100]]), dbc.InputGroupText("Cols:"), dbc.Select(id="select-gol-cols", value=default_cols, options=[{ "value": dim, "label": dim } for dim in [10, 25, 50, 75, 100]]), dbc.InputGroupText("Duration:"), dbc.Select(id="select-gol-tdur",
], navbar=True) ], color="light", dark=False, sticky="top", ) DATASELECTION_CARD = [ dbc.CardHeader(html.H5("Data Selection")), dbc.CardBody( [ html.H5(children='GNPS Data Selection'), dbc.InputGroup( [ dbc.InputGroupText("Spectrum USI"), dbc.Input(id='usi1', placeholder="Enter GNPS USI", value=""), ], className="mb-3", ), dbc.Row([ dbc.Col([ dbc.Button("Copy Link", color="info", id="copy_link_button", n_clicks=0), ]), dbc.Col([ html.A(dbc.Button("View MASST Search", color="info", n_clicks=0), id="link_to_masst", href="", target="_blank"), ])] ), html.Div( [
for key in Fractal.example_paths[path].keys() ], ), dbc.Input( f"input-fractal-{path}", value="Custom Linear Shape", disabled=False, ), dbc.Button( id=f"button-fractal-{path}-undo", children="Undo", color="primary", n_clicks=0, ), dbc.InputGroupText( children="Modifying:", ), dbc.Button( id=f"button-fractal-{path}-mod", children=fractal_segment_datum["name"], color="primary", n_clicks=1, ), ], ), ]), dbc.CardBody([ dcc.Graph( id=f"graph-fractal-{path}", config={"displayModeBar":False, "displaylogo":False}, figure={