Don't display total in legend

total is always 0 in the graph
This commit is contained in:
alzyee 2022-01-30 22:31:47 -05:00 committed by Christopher Charbonneau Wells
parent 37b3205cf8
commit 264bfb970b
1 changed files with 2 additions and 3 deletions

View File

@ -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)