componentes de detalles de visitas.

falta procesar fisiológicos y AUCs.
parent f0a4a5a6
......@@ -182,7 +182,22 @@ app.layout = html.Div(
children=[
html.H1("Detalle de visitas", className="header-title2"),
html.P("..en construcción..", style={"color":"red", "font-style":"italic"}),
dcc.Graph(id="multi-visitas")],
html.Div(children="Visita", className="menu-title"),
dcc.Dropdown(
id="visitaSel",
options=[
{"label":1, "value":1},
{"label":2, "value":2},
{"label":3, "value":3},
{"label":4, "value":4}
],
value=1,
clearable=False,
searchable=False,
className="dropdown",
),
dcc.Graph(id="multi-visitas"),
],
className="wrapper",
),
html.Div(
......@@ -230,10 +245,11 @@ app.layout = html.Div(
Input("min_reloj", "value"),
Input("medidaDet", "value"),
Input("etapaDet", "value"),
Input("visitaSel", "value"),
Input("mesurableEt", "value"),
)
def update_charts(etapaSel,min_comidas, min_glucosa, min_reloj, medidaDet, etapaDet, mesurableEt):
def update_charts(etapaSel,min_comidas, min_glucosa, min_reloj, medidaDet, etapaDet, visitaSel, mesurableEt):
total_data = len(data.index)
gauges = {
'shape': "bullet",
......@@ -379,10 +395,12 @@ def update_charts(etapaSel,min_comidas, min_glucosa, min_reloj, medidaDet, eta
multiV = go.Figure()
antropo = len(data.loc[data["antrop-mets" + str(visitaSel)] > 0])
qsan = len(data.loc[data["quimica-S" + str(visitaSel)] > 0])
composicion = len(data.loc[data["comp-corp" + str(visitaSel)] > 0])
multiV.add_trace(go.Indicator(
value = 100 * len(comidas_data.index) / Total_incluidos,
value = 100 * antropo / Total_incluidos,
domain = {'x': [0.25, 1], 'y': [0.90, 1]},
title = {'text': "Antropometría"},
mode = modes,
......@@ -391,7 +409,7 @@ def update_charts(etapaSel,min_comidas, min_glucosa, min_reloj, medidaDet, eta
))
multiV.add_trace(go.Indicator(
value = 100 * len(comidas_data.index) / Total_incluidos,
value = 100 * qsan / Total_incluidos,
domain = {'x': [0.25, 1], 'y': [0.80, 0.9]},
title = {'text': "QS"},
mode = modes,
......@@ -402,14 +420,14 @@ def update_charts(etapaSel,min_comidas, min_glucosa, min_reloj, medidaDet, eta
multiV.add_trace(go.Indicator(
value = 100 * len(comidas_data.index) / Total_incluidos,
domain = {'x': [0.25, 1], 'y': [0.7, 0.8]},
title = {'text': "Hormonales"},
title = {'text': "Fisiológicos"},
mode = modes,
number = numbers,
gauge = gauges,
))
multiV.add_trace(go.Indicator(
value = 100 * len(comidas_data.index) / Total_incluidos,
value = 100 * composicion / Total_incluidos,
domain = {'x': [0.25, 1], 'y': [0.6, 0.7]},
title = {'text': "C.Corporal"},
mode = modes,
......@@ -420,20 +438,12 @@ def update_charts(etapaSel,min_comidas, min_glucosa, min_reloj, medidaDet, eta
multiV.add_trace(go.Indicator(
value = 100 * len(comidas_data.index) / Total_incluidos,
domain = {'x': [0.25, 1], 'y': [0.5, 0.6]},
title = {'text': "Cuestionarios"},
title = {'text': "Curvas de Tolerancia"},
mode = modes,
number = numbers,
gauge = gauges,
))
multiV.add_trace(go.Indicator(
value = 100 * len(comidas_data.index) / Total_incluidos,
domain = {'x': [0.25, 1], 'y': [0.4, 0.5]},
title = {'text': "AUCs"},
mode = modes,
number = numbers,
gauge = gauges,
))
por_pasos = 1
por_rcard = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment