Skip to content

Commit

Permalink
Fix: color doesnt exist error (#438)
Browse files Browse the repository at this point in the history
* color property check added

* color property check shortened

* color property check reversed
  • Loading branch information
pseusys authored Mar 31, 2023
1 parent caad802 commit f8cec5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sources/graphics_chart_drawer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def create_loc_graph(yearly_data: Dict, save_path: str):
cumulative = zeros((years, 4, 2), dtype=int)

for key, value in languages_all_loc.items():
color = colors[key]["color"] if colors[key]["color"] is not None else "w"
color = colors[key].get("color", "tab:gray")
language_handles += [mpatches.Patch(color=color, label=key)]

for quarter in range(4):
Expand Down

0 comments on commit f8cec5f

Please sign in to comment.