Skip to content

Commit

Permalink
Better printing the style of each group
Browse files Browse the repository at this point in the history
  • Loading branch information
Gouvernathor committed Jun 23, 2024
1 parent e78d765 commit 6fbacf8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/parliamentarch/svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,14 @@ def _append_grouped_svg_seats(
group_border_color = group_border_color.hexcode

buffer.append(f"""
<g style="fill:{group_color}; stroke-width:{group_border_width:.2f}; stroke:{group_border_color}"
id="{block_id}">
<g style="fill:{group_color}""")
if group_border_width:
buffer.append(f"; stroke-width:{group_border_width:.2f}; stroke:{group_border_color}")
# the fourth quote on the next line is intentional
buffer.append(f""""
id="{block_id}">""")
if group.data:
buffer.append(f"""
<title>{group.data}</title>""")

for x, y in seat_centers:
Expand Down

0 comments on commit 6fbacf8

Please sign in to comment.