mirror of https://github.com/snachodog/mybuddy.git
Don't display total in legend
total is always 0 in the graph
This commit is contained in:
parent
37b3205cf8
commit
264bfb970b
|
@ -62,7 +62,8 @@ def feeding_amounts(instances):
|
||||||
y=zeros,
|
y=zeros,
|
||||||
hoverinfo='text',
|
hoverinfo='text',
|
||||||
textposition='outside',
|
textposition='outside',
|
||||||
text=amounts_array[total_idx-1]
|
text=amounts_array[total_idx-1],
|
||||||
|
showlegend=False
|
||||||
))
|
))
|
||||||
|
|
||||||
layout_args = utils.default_graph_layout_options()
|
layout_args = utils.default_graph_layout_options()
|
||||||
|
@ -76,7 +77,5 @@ def feeding_amounts(instances):
|
||||||
'layout': go.Layout(**layout_args)
|
'layout': go.Layout(**layout_args)
|
||||||
})
|
})
|
||||||
fig.update_layout(barmode='stack')
|
fig.update_layout(barmode='stack')
|
||||||
fig.update_yaxes(automargin=True)
|
|
||||||
fig.update_xaxes(automargin=True)
|
|
||||||
output = plotly.plot(fig, output_type='div', include_plotlyjs=False)
|
output = plotly.plot(fig, output_type='div', include_plotlyjs=False)
|
||||||
return utils.split_graph_output(output)
|
return utils.split_graph_output(output)
|
||||||
|
|
Loading…
Reference in New Issue