ponemos el multi-gauge en su propia función

y quitamos el gauge de visitas. porque siempre debería dar el 100%.
parent 87109018
......@@ -164,7 +164,7 @@ app.layout = html.Div(children=[
),
]),
#gráfica
html.Div(children=[dcc.Graph(id="multi-chart")],)
html.Div(children=[dcc.Graph(id="gauges")],)
],style={'display': 'flex', 'flexDirection': 'row'}, className="wrapper"),
# segundo 'panel': datos existentes por paciente.
html.Div(children=[
......@@ -281,26 +281,13 @@ app.layout = html.Div(children=[
], className="wrapper")
]) # cierre del layout
@app.callback(
Output("multi-chart", "figure"),
Output("detalle_figura", "figure"),
Output("multi-visitas", "figure"),
Output("detalle_pruebas", "figure"),
Output("mesurables", "figure"),
Output("gauges", "figure"),
Input("etapaSel", "value"),
Input("min_comidas", "value"),
Input("min_glucosa", "value"),
Input("medidaDet", "value"),
Input("etapaDet", "value"),
Input("visitaSel", "value"),
Input("visitaPruebas", "value"),
Input("mesurableEt", "value"),
Input("min_glucosa", "value"),
)
def update_charts(etapaSel,min_comidas, min_glucosa, medidaDet, etapaDet, visitaSel, visitaPruebas, mesurableEt):
contados = {}
total_data = len(data.index)
def update_gauges(etapaSel, min_comidas, min_glucosa):
gauges = {
'shape': "bullet",
'axis': {'range': [None, 100]},
......@@ -383,17 +370,24 @@ def update_charts(etapaSel,min_comidas, min_glucosa, medidaDet, etapaDet, visita
number = numbers,
gauge = gauges
))
return multi
@app.callback(
Output("detalle_figura", "figure"),
Output("multi-visitas", "figure"),
Output("detalle_pruebas", "figure"),
Output("mesurables", "figure"),
Input("medidaDet", "value"),
Input("etapaDet", "value"),
Input("visitaSel", "value"),
Input("visitaPruebas", "value"),
Input("mesurableEt", "value"),
multi.add_trace(go.Indicator(
value = 100 * len(visitas_data.index) / Total_incluidos,
domain = {'x': [0.25, 1], 'y':[0.9, 1.0]},
title = {'text': "Visitas"},
mode = modes,
number = numbers,
gauge = gauges
))
)
def update_charts( medidaDet, etapaDet, visitaSel, visitaPruebas, mesurableEt):
contados = {}
total_data = len(data.index)
if etapaDet == 99:
etapaDet = "out"
......
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