コード例 #1
0
import dash_bootstrap_components as dbc

app = dash.Dash(__name__,
                plugins=[dl.plugins.pages],
                external_stylesheets=[dbc.themes.BOOTSTRAP])

dash.register_page("home", layout="We're home!", path="/")

navbar = dbc.NavbarSimple(
    dbc.DropdownMenu(
        [
            dbc.DropdownMenuItem(page["name"], href=page["path"])
            for page in dash.page_registry.values()
            if page["module"] != "pages.not_found_404"
        ],
        nav=True,
        label="More Pages",
    ),
    brand="Multi Page App Plugin Demo",
    color="primary",
    dark=True,
    className="mb-2",
)

app.layout = dbc.Container(
    [
        navbar,
        dl.plugins.page_container,
    ],
    className="dbc",
    fluid=True,
コード例 #2
0
import dash_daq as daq
from dash.dependencies import Input, Output, State
import dash_table
import dash_bootstrap_components as dbc

app = dash.Dash(__name__,
                external_stylesheets=[dbc.themes.FLATLY],
                meta_tags=[{
                    "name": "viewport",
                    "content": "width=device-width, initial-scale=1.0"
                }])

app.config['suppress_callback_exceptions'] = True

navbar = dbc.NavbarSimple(children=[],
                          brand="Beetle",
                          color="primary",
                          dark=True)

icon_name = ['static/facebook.png', 'static/twitter.png', 'static/insta.png']
url_list = [
    'https://www.facebook.com/i80846dx2/', 'https://twitter.com/i80486dx23419',
    'https://www.instagram.com/takuya3419/'
]

my_img = dbc.CardColumns([
    dbc.Card([
        dbc.CardImg(src="/static/face.png", top=True),
        dbc.CardBody([
            html.H5("Beetle", className="card-title"),
            dbc.Button("Contact", color="primary", id="collapse-button"),
            dbc.Collapse([
コード例 #3
0

country_rawdata.drop(['People_Tested', 'People_Hospitalized'], axis=1, inplace=True)
confirmed_rawdata.drop('Province/State', axis=1, inplace=True)
death_rawdata.drop('Province/State', axis=1, inplace=True)
recovered_rawdata.drop('Province/State', axis=1, inplace=True)


app = dash.Dash(external_stylesheets=[dbc.themes.COSMO])

main_heading = dbc.Container([html.H1(["Coronavirus Pandemic Data Visualization"], className="my-3 text-center")])


navigationbar = dbc.NavbarSimple(
    children=[
        dbc.NavItem(html.A("Confirmed/Recovered/Deaths", href='#confirmed', style={'color': 'white'}), className="mr-5"),
        dbc.NavItem(html.A("World Map", href="#worldmap", style={'color': 'white'}), className="mr-5"),
        dbc.NavItem(html.A("Mortality & Recovery Rate", href="#mortality", style={'color': 'white'}), className="mr-5")
    ], brand="Covid-19 Data Visualízation", color='dark', dark=True, className='fixed-top p-4')

#####################################################################################################
Total_Cases = dbc.Container(
    dbc.Row(
        [
            dbc.Col(children=[html.H4('Total Confirmed'),
                              html.Div(country_rawdata['Confirmed'].sum(),
                                       style={'font-size': '24px', 'color': 'brown'})],
                    className='text-center border-right p-2',
                    ),
            dbc.Col(children=[html.H4('Total Recovered', style={'padding-top': '0px'}),
                              html.Div(country_rawdata['Recovered'].sum(),
                                       style={'font-size': '24px', 'color': 'green'})],
コード例 #4
0
ファイル: app.py プロジェクト: bhernan2/final-project
    className='mt-3 py-2 pb-1 text-center')

# Initialize the app
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.JOURNAL])

#Define the app
app.layout = html.Div([
    dbc.NavbarSimple(
        children=[
            dbc.NavItem(dbc.NavLink("Main Dashboard", href="app.py")),
            dbc.DropdownMenu(
                children=[
                    #dbc.DropdownMenuItem("Projections", header=False),
                    dbc.DropdownMenuItem("Projections", href="app2.py"),
                ],
                nav=True,
                in_navbar=True,
                label="More",
            ),
        ],
        brand="COVID-19 Pandemic Dashboard",
        brand_href="app.py",
        color="black",
        dark=True,
    ),
    dbc.Card([
        dbc.CardBody([
            dbc.Container([
                html.H1(children='Remotely monitoring the COVID-19 pandemic',
                        className='mt-5 py-4 pb-3 text-center'),
                html.
                P("Dashboard contributors: Bianca A. Hernandez, Ningning Du, Neil Hsu, Youngjung Choi",
コード例 #5
0
color (string, optional): Sets the color of the NavbarSimple. Main options are primary, light and dark, default light. You can also choose one of the other contextual classes provided by Bootstrap (secondary, success, warning, danger, info, white) or any valid CSS color of your choice (e.g. a hex code, a decimal code or a CSS color name)
dark (boolean, optional): Applies the `navbar-dark` class to the NavbarSimple, causing text in the children of the Navbar to use light colors for contrast / visibility.
light (boolean, optional): Applies the `navbar-light` class to the NavbarSimple, causing text in the children of the Navbar to use dark colors for contrast / visibility.
sticky (string, optional): Stick the navbar to the top or the bottom of the viewport, options: top, bottom. With `sticky`, the navbar remains in the viewport when you scroll. By contrast, with `fixed`, the navbar will remain at the top or bottom of the page.
"""

navbar = dbc.NavbarSimple(brand='PredictDebt',
                          brand_href='/',
                          children=[
                              dbc.NavItem(
                                  dcc.Link('Predictions',
                                           href='/predictions',
                                           className='nav-link')),
                              dbc.NavItem(
                                  dcc.Link('Insights',
                                           href='/insights',
                                           className='nav-link')),
                              dbc.NavItem(
                                  dcc.Link('Process',
                                           href='/process',
                                           className='nav-link')),
                          ],
                          sticky='top',
                          color='primary',
                          light=False,
                          dark=True)

footer = dbc.Container(
    dbc.Row(
        dbc.Col(
            html.P([
                html.Span('Luc Guittard', className='mr-2'),
コード例 #6
0
ファイル: app.py プロジェクト: gostekk/dash
    dbc.DropdownMenuItem('Experience', id='experience')
]

colors = {
    'first_background': '#000000',
    'second_background': '#212121',
    'text_color': '#FFFFFF',
}

app.layout = html.Div(children=[
    html.Div(children=[
        dbc.NavbarSimple(
            children=[
                dbc.DropdownMenu(
                    categories, label='Categories', color='secondary')
            ],
            brand='Developer Profile',
            color='dark',
            dark='True',
        ),
    ]),
    html.Div(id='content')
])


@app.callback(Output('content', 'children'), [
    Input('developer_roles', 'n_clicks'),
    Input('education', 'n_clicks'),
    Input('experience', 'n_clicks')
])
def update_content(*args):
コード例 #7
0

def decompress_pickle(file):
 data = bz2.BZ2File(file, 'rb')
 data = cPickle.load(data)
 return data


model = decompress_pickle('/model/model_2.pbz2') 
tfidf = joblib.load('/model/tfidf.joblib')

navbar = dbc.NavbarSimple(
    children=[
        dbc.NavItem(
            dbc.NavLink("Home", href="/main"))
    ],
    brand="U.S. Census Bureau E-mail NLP Dash",
    brand_href="#",
    color="primary",
    dark=True,
)


row_1 = html.Div(
    [
        dbc.Row(
            [
                dbc.Col(
                    dbc.Container([html.H3("Subject Line")])),
                dbc.Col(
                    dbc.Container([html.H3("Email Body")])),
            ]
コード例 #8
0
ファイル: run.py プロジェクト: CSLSDS/SkySurvey
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output

# Imports from this application
from app import app, server
from pages import index, process, insights # predictions, insights, process, pagename

# Navbar docs: https://dash-bootstrap-components.opensource.faculty.ai/l/components/navbar
navbar = dbc.NavbarSimple(
    brand='Look! Up in the sky! It\'s a bird! It\'s a plane! It\'s... Wait - what is it?',
    brand_href='/', 
    children=[
        #dbc.NavItem(dcc.Link('Predictions', href='/predictions', className='nav-link')), 
        dbc.NavItem(dcc.Link('Insights', href='/insights', className='nav-link')), 
        dbc.NavItem(dcc.Link('Process', href='/process', className='nav-link')), 
        #dbc.NavItem(dcc.Link('Page Name', href='/pagename', className='nav-link'))
    ],
    sticky='top',
    color='dark', 
    light=False, # text
    dark=True
)

# Footer docs:
# dbc.Container, dbc.Row, dbc.Col: https://dash-bootstrap-components.opensource.faculty.ai/l/components/layout
# html.P: https://dash.plot.ly/dash-html-components
# fa (font awesome) : https://fontawesome.com/icons/github-square?style=brands
# mr (margin right) : https://getbootstrap.com/docs/4.3/utilities/spacing/
# className='lead' : https://getbootstrap.com/docs/4.3/content/typography/#lead
footer = dbc.Container(
    dbc.Row(
コード例 #9
0
import dash
import dash_labs as dl
import dash_bootstrap_components as dbc

app = dash.Dash(
    __name__,
    plugins=[dl.plugins.pages],
    external_stylesheets=[dbc.themes.BOOTSTRAP],
)

navbar = dbc.NavbarSimple(
    dbc.Nav([
        dbc.NavLink(page["name"], href=page["path"])
        for page in dash.page_registry.values() if page.get("top_nav")
    ], ),
    brand="Multi Page App Demo",
    color="primary",
    dark=True,
    className="mb-2",
)

app.layout = dbc.Container(
    [navbar, dl.plugins.page_container],
    fluid=True,
)

if __name__ == "__main__":
    app.run_server(debug=True)
コード例 #10
0
graphs = [
    {"label": "Bar Graph", "value": "1"},
    {"label": "Line Graph", "value": "2"},
    {"label": "Pie Graph", "value": "3"},
    {"label": "Scatter Graph", "value": "4"},
    {"label": "Box Graph", "value": "5"},
    {"label": "Histogram Graph", "value": "6"}]

# Header bar
navbar = dbc.NavbarSimple(
    brand="Interactive ML Platform",
    brand_style={'font-size':'20px'},
    color="success",
    dark=True, style={
        'width': '100%',
        'height': '7rem',
        'text-size':'15px',
        'verticalAlign': 'middle'
    }
)

interpreter = html.Iframe(src="https://repl.it/repls/PurpleHeavyRuntimes?lite=true",
            style={'width': "100%",
                   'height': "1000",
                   'frameborder': "0",
                   'marginwidth': "0",
                   'marginheight': "0", 'allowfullscreen': 'true'},
            id='interpreter',
            height=500),
#
コード例 #11
0
ファイル: app.py プロジェクト: Kully/day-trading-app
], id="tab3-content")

navbar = dbc.NavbarSimple(
    children=[
        dbc.NavItem(dbc.NavLink("Overview", href="#")),
        dbc.NavItem(dbc.NavLink("Banking", href="#")),
        dbc.NavItem(dbc.NavLink("Investing", href="#")),
        dbc.NavItem(dbc.NavLink("Insights", href="#")),
        dbc.DropdownMenu(
            children=[
                dbc.DropdownMenuItem("Settings", href="#"),
                dbc.DropdownMenuItem("Help", href="#"),
                dbc.DropdownMenuItem("Metrics", href="#"),
                dbc.DropdownMenuItem("Tools", href="#"),
                dbc.DropdownMenuItem("Log Out", href="#"),
            ],
            nav=True,
            in_navbar=True,
            label="Hi, User1423",
        ),
        dbc.Button(
            ["", dbc.Badge("+5", color="light", className="ml-1")],
            color="primary",
        ),
    ],
    brand="Personal Finance and Budgeting Tool",
    brand_href="#",
    color="primary",
    fluid=True,
)

tab_card = dbc.Card(
コード例 #12
0
navbar_layout = dbc.NavbarSimple(
    children=[
        dbc.NavItem(
            dbc.NavLink(
                [html.I(className="fa fa-github"), "View Source Code"],
                href="https://github.com/taherromdhane/inpainting-images",
                target="_blank")),
        dbc.NavItem(
            dbc.NavLink(
                [html.I(className="fa fa-file"), "View Report"],
                href=
                "https://docs.google.com/gview?url=https://github.com/taherromdhane/inpainting-images/raw/master/project_report.pdf",
                target="_blank")),
        dbc.NavItem(
            dbc.NavLink(
                [html.I(className="fa fa-file"), "View Docs"],
                href="https://taherromdhane.github.io/inpainting-images/",
                target="_blank")),
        dbc.DropdownMenu(
            children=[
                dbc.DropdownMenuItem("More Links", header=True),
                dbc.DropdownMenuItem("Github",
                                     href="https://github.com/taherromdhane"),
                dbc.DropdownMenuItem(
                    "LinkedIn",
                    href="https://www.linkedin.com/in/taher-romdhane/"),
            ],
            nav=True,
            in_navbar=True,
            label="More",
        ),
    ],
    style={
        'fontWeight': 'bold',
        'height': '50px',
        'paddingRight': '3rem',
        'paddingLeft': '3rem',
    },
    brand="The Inpainter",
    brand_href="#",
    color="black",
    fluid=True,
    sticky='top',
    dark=True,
)
コード例 #13
0
from dash.dependencies import Input, Output

# Imports from this application
from app import app, server
from pages import index, predictions, insights, process, data

# Navbar docs: https://dash-bootstrap-components.opensource.faculty.ai/l/components/navbar
navbar = dbc.NavbarSimple(
    brand='Join the Resistance!',
    brand_href='/',
    children=[
        dbc.NavItem(
            dcc.Link('Predictions', href='/predictions',
                     className='nav-link')),
        dbc.NavItem(dcc.Link('Process', href='/process',
                             className='nav-link')),
        dbc.NavItem(
            dcc.Link('Insights', href='/insights', className='nav-link')),
        dbc.NavItem(dcc.Link('Sample Data', href='/data',
                             className='nav-link')),
    ],
    sticky='top',
    color='light',
    light=True,
    dark=False)

# Footer docs:
# dbc.Container, dbc.Row, dbc.Col: https://dash-bootstrap-components.opensource.faculty.ai/l/components/layout
# html.P: https://dash.plot.ly/dash-html-components
# fa (font awesome) : https://fontawesome.com/icons/github-square?style=brands
# mr (margin right) : https://getbootstrap.com/docs/4.3/utilities/spacing/
# className='lead' : https://getbootstrap.com/docs/4.3/content/typography/#lead
コード例 #14
0
ファイル: index.py プロジェクト: nicholsons/comp0034_week5
from dash import dcc, html, Input, Output
import dash_bootstrap_components as dbc

from multi_page_app.apps.app1 import app1
from multi_page_app.apps.app2 import app2
from multi_page_app.apps.app3 import app3

from multi_page_app.app import app

navbar = dbc.NavbarSimple(
    children=[
        dbc.NavItem(dbc.NavLink("Page 1", href="/app1/"), id="page-1-link"),
        dbc.NavItem(dbc.NavLink("Page 2", href="/app2/"), id="page-2-link"),
        dbc.NavItem(dbc.NavLink("Page 3", href="/app3/"), id="page-3-link")
    ],
    brand="Multi page app example",
    brand_href="/",
    color="primary",
    dark=True,
)

app.layout = html.Div([
    dcc.Location(id='url', refresh=False),
    navbar,
    html.Div(id='page-content')
])

index_layout = html.Div([
    html.P('Hello')
])
コード例 #15
0
# navbar
app = dash.Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])
navbar = dbc.NavbarSimple(
    children=[
        #dbc.NavItem(html.A("The Covid Info Store", href="/static/covidinfo.html", style={'color': '#fff'}), className="mr-5"),
        dbc.NavItem(html.A("World Data",
                           href="#world_overall_data",
                           style={'color': '#fff'}),
                    className="mr-5"),
        dbc.NavItem(html.A("Daily Data",
                           href="#nav-daily-graph",
                           style={'color': '#fff'}),
                    className="mr-5"),
        dbc.NavItem(html.A("Most Affected",
                           href="#nav-top-country-graph",
                           style={'color': '#fff'}),
                    className="mr-5"),
        dbc.NavItem(html.A("Comparison",
                           href="#nav-cr-link",
                           style={'color': '#fff'}),
                    className="mr-5"),
    ],
    brand="COVID-19",
    brand_href="/",
    color="#001011",
    dark=False,
    className="p-3 fixed-top")

# main heading
main_heading = dbc.Container([
コード例 #16
0
ファイル: app - old.py プロジェクト: rheinheimer/sierra-dash
                       options=[{
                           "label": theme,
                           "value": theme
                       } for theme in THEMES],
                       value=selected)
    ]


navbar = dbc.NavbarSimple(
    children=[
        # dbc.NavItem(dbc.NavLink("Link", href="#")),
        # dbc.DropdownMenu(
        #     nav=True,
        #     in_navbar=True,
        #     id='select-themes',
        #     label="Theme",
        #     children=render_themes(),
        # ),
    ],
    brand="San Joaquin Dashboard",
    brand_href="#",
    sticky="top",
)

transform_radio = dbc.FormGroup(
    [
        dbc.Label("Transform", html_for="radio-transform", width=2),
        dbc.RadioItems(
            id="radio-transform",
            options=[
                {
コード例 #17
0
from app import app, server
from pages import index, features, predictions, insights, process

# Navbar docs: https://dash-bootstrap-components.opensource.faculty.ai/l/components/navbar
navbar = dbc.NavbarSimple(brand="""Our Supreme Justices""",
                          brand_href='/',
                          children=[
                              dbc.NavItem(
                                  dcc.Link('Features',
                                           href='/features',
                                           className='nav-link')),
                              dbc.NavItem(
                                  dcc.Link('Predictions',
                                           href='/predictions',
                                           className='nav-link')),
                              dbc.NavItem(
                                  dcc.Link('Insights',
                                           href='/insights',
                                           className='nav-link')),
                              dbc.NavItem(
                                  dcc.Link('Process',
                                           href='/process',
                                           className='nav-link')),
                          ],
                          sticky='top',
                          color='dark',
                          light=False,
                          dark=True)

# Footer docs:
# dbc.Container, dbc.Row, dbc.Col: https://dash-bootstrap-components.opensource.faculty.ai/l/components/layout
# html.P: https://dash.plot.ly/dash-html-components
コード例 #18
0
# Imports from this application
from app import app, server
from pages import index, predictions, insights, process

# Navbar docs: https://dash-bootstrap-components.opensource.faculty.ai/l/components/navbar
navbar = dbc.NavbarSimple(brand='S&P 500 - Month Ahead Direction',
                          brand_href='/',
                          children=[
                              dbc.NavItem(
                                  dcc.Link('Predictions',
                                           href='/predictions',
                                           className='nav-link')),
                              dbc.NavItem(
                                  dcc.Link('Insights',
                                           href='/insights',
                                           className='nav-link')),
                              dbc.NavItem(
                                  dcc.Link('Process',
                                           href='/process',
                                           className='nav-link')),
                          ],
                          sticky='top',
                          color='light',
                          light=True,
                          dark=False)

# Footer docs:
# dbc.Container, dbc.Row, dbc.Col: https://dash-bootstrap-components.opensource.faculty.ai/l/components/layout
# html.P: https://dash.plot.ly/dash-html-components
# fa (font awesome) : https://fontawesome.com/icons/github-square?style=brands
# mr (margin right) : https://getbootstrap.com/docs/4.3/utilities/spacing/
コード例 #19
0
periods += list(range(min_date.year, max_date.year))
periods += ['This year', 'This month', 'This week']
periods.reverse()

week_start = today - datetime.timedelta(days=7)
month_start = today - datetime.timedelta(days=today.day - 1)

navbar = dbc.NavbarSimple(
    children=[
        dcc.Dropdown(id='year-input',
                     options=[{
                         'label': str(i),
                         'value': str(i)
                     } for i in periods],
                     value='This week',
                     clearable=False,
                     style={
                         'bgcolor': '#f8f9fa',
                         'bordercolor': '#f8f9fa'
                     })
    ],
    brand="Last Dash",
    brand_href="#",
    sticky="top",
)

app = dash.Dash(__name__, external_stylesheets=external_stylesheets)

app.layout = html.Div(
    className='text-center',
    children=[
        navbar,
コード例 #20
0
from dash.exceptions import PreventUpdate

df = pd.DataFrame()

# Header bar
navbar = dbc.NavbarSimple(brand="Interactive ML Platform",
                          color="success",
                          brand_style={'font-size': '20px'},
                          children=[
                              dcc.Link(dbc.Button(
                                  "Exploratory Data Analysis (EDA)",
                                  id="eda_btn",
                                  className="mb-3",
                                  outline=True,
                                  color="dark",
                                  style={
                                      'width': '100%',
                                      'font-size': '10px'
                                  }),
                                       href="/eda")
                          ],
                          dark=True,
                          style={
                              'width': '100%',
                              'height': '7rem',
                              'verticalAlign': 'middle'
                          })

# Breakline
breakline = html.Br()

upload_dataset_tooltip = html.Div([
コード例 #21
0
ファイル: index.py プロジェクト: RemyFevry/anfr-dataviz
import dash_core_components as dcc
import dash_html_components as html
import plotly.express as px
import pandas as pd
import dash_bootstrap_components as dbc
from dash.dependencies import Input, Output
from layouts import antenne, emetteur, station, support
from callbacks.antenne import *

pages = ["Antenne", "Emetteur", "Station", "Support"]

navbar = dbc.NavbarSimple(
    children=[
        dbc.NavItem(dbc.NavLink(i, href="/" + i.lower())) for i in pages
    ],
    brand="ANFR - Dataviz",
    brand_href="#",
    color="primary",
    dark=True,
)

app.layout = html.Div([
    dcc.Location(id='url', refresh=False), navbar,
    html.Div(id='page-content')
])


@app.callback(Output('page-content', 'children'), Input('url', 'pathname'))
def display_page(pathname):
    if pathname == '/antenne':
        return antenne.layout
コード例 #22
0
color (string, optional): Sets the color of the NavbarSimple. Main options are primary, light and dark, default light. You can also choose one of the other contextual classes provided by Bootstrap (secondary, success, warning, danger, info, white) or any valid CSS color of your choice (e.g. a hex code, a decimal code or a CSS color name)
dark (boolean, optional): Applies the `navbar-dark` class to the NavbarSimple, causing text in the children of the Navbar to use light colors for contrast / visibility.
light (boolean, optional): Applies the `navbar-light` class to the NavbarSimple, causing text in the children of the Navbar to use dark colors for contrast / visibility.
sticky (string, optional): Stick the navbar to the top or the bottom of the viewport, options: top, bottom. With `sticky`, the navbar remains in the viewport when you scroll. By contrast, with `fixed`, the navbar will remain at the top or bottom of the page.
"""

navbar = dbc.NavbarSimple(brand='INTRO',
                          brand_href='/',
                          children=[
                              dbc.NavItem(
                                  dcc.Link('Predictions',
                                           href='/predictions',
                                           className='nav-link')),
                              dbc.NavItem(
                                  dcc.Link('Methodology',
                                           href='/process',
                                           className='nav-link')),
                              dbc.NavItem(
                                  dcc.Link('Data Gathering',
                                           href='/gathering',
                                           className='nav-link')),
                          ],
                          sticky='top',
                          color='primary',
                          light=True,
                          dark=False)

footer = dbc.Container(
    dbc.Row(
        dbc.Col(
            html.P([
                html.Span('Rob Hamilton', className='mr-2'),
コード例 #23
0
ファイル: app.py プロジェクト: GIBD/dengue
    ["FechaReporte", "Region"], as_index=False)["Importados"].agg("sum")
dengueRegionesInv = casosDengueInvertido.groupby(
    ["FechaReporte", "Region"], as_index=False)["Total en Inv"].agg("sum")
dengueRegionesNotif = casosDengueInvertido.groupby(
    ["FechaReporte", "Region"],
    as_index=False)["Total notificados para dengue"].agg("sum")
dengueRegionesFall = casosDengueInvertido.groupby(
    ["FechaReporte", "Region"], as_index=False)["AcumFallecidos"].agg("sum")

app.layout = html.Div([
    dbc.NavbarSimple(
        children=[
            # dbc.NavItem(dbc.NavLink("Inicio", href="#")),
            # dbc.NavItem(dbc.NavLink("Sudamérica", href="#")),
            # dbc.NavItem(dbc.NavLink("Argentina", href="#")),
            # dbc.NavItem(dbc.NavLink("Entre Ríos", href="#")),
        ],
        brand="Dengue GIBD",
        brand_href="http://www.frcu.utn.edu.ar/gibd",
        color="#000B3B",
        dark=True,
    ),
    dbc.Jumbotron([
        dbc.Row(
            [
                html.A(
                    html.Img(
                        src=app.get_asset_url("Logo(Banner).png"),
                        style={
                            "width": "90px",
                            "padding": "10px"
                        },
コード例 #24
0
        row_deletable = row_deletable,
        style_table={'padding-left':'10px','width': '97%'},
        style_cell = {'text-align':'center'}
    )
    return trade_table

navbar = dbc.NavbarSimple(
    children=[
        dbc.NavItem(dbc.NavLink("Page 1", href="#")),
        dbc.DropdownMenu(
            children=[
                dbc.DropdownMenuItem("More pages", header=True),
                dbc.DropdownMenuItem("Page 2", href="#"),
                dbc.DropdownMenuItem("Page 3", href="#"),
            ],
            nav=True,
            in_navbar=True,
            label="More",
        ),
    ],
    brand="Freedom",
    brand_href="#",
    color="dark",
    dark=True,
)

# Left pane for writing algo
algo_input = html.Div(dbc.FormGroup([dbc.InputGroup([dbc.InputGroupAddon(dcc.Dropdown(id='select_algo', options=algo_list_options, style={"min-width":'200px','height':'10px','font-size':'0.9em'}, value='default', clearable=False),addon_type="prepend"), dbc.Input(id="algo-name",placeholder="Filename",value="default"),dbc.InputGroupAddon(dbc.Button("Save", id="algo-save",color="secondary"), addon_type="append")],size="sm"),
                         #   dbc.Textarea(className="mb-3", style={'height':'500px'}, id='algo', value=""),
                            dash_editor_components.PythonEditor(id='algo', value='')
                        ]), style={'max-width':'700px'})
コード例 #25
0
ファイル: run.py プロジェクト: LilySu/Dash
brand (string, optional): Brand text, to go top left of the navbar.
brand_href (string, optional): Link to attach to brand.
children (a list of or a singular dash component, string or number, optional): The children of this component
color (string, optional): Sets the color of the NavbarSimple. Main options are primary, light and dark, default light. You can also choose one of the other contextual classes provided by Bootstrap (secondary, success, warning, danger, info, white) or any valid CSS color of your choice (e.g. a hex code, a decimal code or a CSS color name)
dark (boolean, optional): Applies the `navbar-dark` class to the NavbarSimple, causing text in the children of the Navbar to use light colors for contrast / visibility.
light (boolean, optional): Applies the `navbar-light` class to the NavbarSimple, causing text in the children of the Navbar to use dark colors for contrast / visibility.
sticky (string, optional): Stick the navbar to the top or the bottom of the viewport, options: top, bottom. With `sticky`, the navbar remains in the viewport when you scroll. By contrast, with `fixed`, the navbar will remain at the top or bottom of the page.
"""

navbar = dbc.NavbarSimple(
    brand='Census by County',
    brand_href='/',
    children=[
        dbc.NavItem(dcc.Link('Predictions', href='/predictions', className='nav-link')),
        dbc.NavItem(dcc.Link('Insights', href='/insights', className='nav-link')),
        dbc.NavItem(dcc.Link('Process', href='/process', className='nav-link')),
        dbc.NavItem(dcc.Link('More', href='/document', className='nav-link')),
    ],
    sticky='top',
    color='light',
    light=True,
    dark=False
)

footer = dbc.Container(
    dbc.Row(
        dbc.Col(
            html.P(
                [
                    html.Span('', className='mr-2'),
                    html.A(html.I(className='fas fa-envelope-square mr-1'), href='mailto:[email protected]'),
                    html.A(html.I(className='fab fa-github-square mr-1'), href='https://github.com/LilySu/Census'),
コード例 #26
0
import dash_bootstrap_components as dbc

navbar = dbc.NavbarSimple(
    children=[
        dbc.NavItem(dbc.NavLink('Home', href='/dash/')),
        dbc.DropdownMenu(
            children=[
                dbc.DropdownMenuItem("Pages", header=True),
                dbc.DropdownMenuItem("Page 1", href="/dash/page1"),
                dbc.DropdownMenuItem("Page 2", href="/dash/page2"),
                dbc.DropdownMenuItem(divider=True),
                dbc.DropdownMenuItem("Logout", href='/dash/logout')
            ],
            nav=True,
            in_navbar=True,
            label="Profile",
        ),
    ],
    brand="Login Page Template",
    brand_href="/dash/",
    color="#337ab7",
    dark=True,
)
コード例 #27
0
ファイル: app.py プロジェクト: fredliporace/covid-projections
    displaylogo= False,
    showLink = False,
    modeBarButtonsToRemove = [
    'sendDataToCloud',
    'zoomIn2d',
    'zoomOut2d',
    'hoverClosestCartesian',
    'hoverCompareCartesian',
    'hoverClosest3d',
    'hoverClosestGeo',
    'resetScale2d']
)

app.layout = dbc.Container(
    [
        dbc.NavbarSimple(brand=title, color="primary", dark=True),
        html.Div(dbc.Alert("Historical model projections for a given country or region (currently only supports IHME projections)", color="primary", id='alert')),
        html.Hr(),
        dbc.Row(
            [
                dbc.Col(controls, md=3),
                dbc.Col(dcc.Graph(id="primary-graph", config=plotly_config), md=9),
            ],
            align="center",
        ),
        html.Hr(),
        dbc.Row(id='stat-cards'),
        html.Hr(),

        dbc.Navbar(
            [
コード例 #28
0
new_navbar = dbc.Navbar(
    [
        # html.A(
        #     # Use row and col to control vertical alignment of logo / brand
        #     dbc.Row(
        #         [
        #             dbc.Col(html.Img(src="filename.png", height="30px")),
        #             dbc.Col(dbc.NavbarBrand("Navbar", className="ml-2")),
        #         ],
        #         align="center",
        #         no_gutters=True,
        #     ),
        #     href="https://plot.ly",
        # ),
        dbc.NavbarBrand("Covid India Tracker", className="ml-2"),
        dbc.Collapse(email_bar, id="navbar-collapse", navbar=True)
    ],
    color="dark",
    dark=True,
)

navbar = dbc.NavbarSimple(
    # children=[
    #     dbc.NavItem(dbc.NavLink("Covid India Tracker", href="#"))
    # ],
    brand="Covid India Tracker",
    brand_href="#",
    color="dark",
    dark=True,
)
コード例 #29
0
    return dcc.Graph(
        id='shows-heatmap',
        figure=fig
    )


navbar = dbc.NavbarSimple(
    children=[
        dbc.NavItem(dbc.NavLink("Link", href="#")),
        dbc.DropdownMenu(
            nav=True,
            in_navbar=True,
            label="Menu",
            children=[
                dbc.DropdownMenuItem("Entry 1"),
                dbc.DropdownMenuItem("Entry 2"),
                dbc.DropdownMenuItem(divider=True),
                dbc.DropdownMenuItem("Entry 3"),
            ],
        ),
    ],
    brand="graplist.fm",
    brand_href="#",
    sticky="top",
)

body = dbc.Container(
    [
        dbc.Row(
            [
                dbc.Col(
コード例 #30
0
import dash_html_components as html
from dash.dependencies import Input, Output

# Imports from this application
from app import app, server
from pages import index, predictions, insights, process

# Navbar docs: https://dash-bootstrap-components.opensource.faculty.ai/l/components/navbar
navbar = dbc.NavbarSimple(
    brand='Students Seeking Help for Anxiety or Depression',
    brand_href='/',
    children=[
        dbc.NavItem(
            dcc.Link('Predictions', href='/predictions',
                     className='nav-link')),
        dbc.NavItem(
            dcc.Link('Insights', href='/insights', className='nav-link')),
        dbc.NavItem(dcc.Link('Process', href='/process',
                             className='nav-link')),
    ],
    sticky='top',
    color='dark',
    light=False,
    dark=True)

# Footer docs:
# dbc.Container, dbc.Row, dbc.Col: https://dash-bootstrap-components.opensource.faculty.ai/l/components/layout
# html.P: https://dash.plot.ly/dash-html-components
# fa (font awesome) : https://fontawesome.com/icons/github-square?style=brands
# mr (margin right) : https://getbootstrap.com/docs/4.3/utilities/spacing/
# className='lead' : https://getbootstrap.com/docs/4.3/content/typography/#lead
footer = dbc.Container(