Skip to content

Commit

Permalink
fix miss-alignment in bar chart
Browse files Browse the repository at this point in the history
  • Loading branch information
ab-smith committed Apr 15, 2024
1 parent bbb2507 commit 71216fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/core/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,8 @@ def assessment_per_status(user: User, model: RiskAssessment | ComplianceAssessme
v = {"value": count, "itemStyle": {"color": color_map[st[0]]}}
values.append(v)
labels.append(st[1])
#add undefined as the first element in the labels to balance the values
labels.insert(0, "undefined")
local_lables = [camel_case(str(label)) for label in labels]
return {"localLables": local_lables, "labels": labels, "values": values}

Expand Down

0 comments on commit 71216fd

Please sign in to comment.