예제 #1
0
                     'color': colors['text'],
                     'backgroundColor': colors['background']
                 }),
        html.Br(),
        html.Div(children=hint_card(hint_text),
                 style={
                     'textAlign': 'left',
                     'color': colors['text'],
                     'backgroundColor': colors['background']
                 }),
        #add fig here
        dcc.Graph(id='ty-figure', figure=fig),
        html.Br(),
        html.Hr(className="my-2"),
        html.Br(),
        html.Div(children=warning_card(data_sources, data_licenses,
                                       sourced_date),
                 style={
                     'textAlign': 'left',
                     'color': colors['text'],
                     'backgroundColor': colors['background']
                 })
    ])


def Add_Dash(server):
    app = Dash(
        server=server,
        url_base_pathname=url_base,
        external_stylesheets=[dbc.themes.BOOTSTRAP],
        external_scripts=["https://cdn.plot.ly/plotly-locale-de-latest.js"],
        meta_tags=[{
예제 #2
0
        }
    ),
    html.Div(children=description_card(description_text), style={
        'textAlign': 'center',
        'color': colors['text'],
        'backgroundColor': colors['background']
    }),
    html.Div(children=cite_card(cite_text,cite_author,cite_link), style={
        'textAlign': 'center',
        'color': colors['text'],
        'backgroundColor': colors['background']
    }),
    html.Br(),
    html.Hr(className="my-2"),
    html.Br(),
    html.Div(children=warning_card(data_sources,data_licenses), style={
        'textAlign': 'left',
        'color': colors['text'],
        'backgroundColor': colors['background']
    })
])

def cast_int(val):
    if val is None: return 1
    return int(val)

def cast_float(val):
    if val is None: return 1.0
    return float(val)

def Add_Dash(server):