cmkimber / Elections_Ontario_App

Webapp to explore Elections Ontario data
0 stars 0 forks source link

fix donut chart label formatting #6

Open cmkimber opened 1 month ago

cmkimber commented 1 month ago

At present the formatting of labels for the donut chart in the pane 2 draft is not working. The call to glue() is printing HTML tags directly rather than formatting them. This is probably because the label formatting in geom_label_repel_interactive() is not responsive in the same way that the tooltip labels in ggiraph are.

Investigate and correct so the party acronym can be displayed in bold on a separate line.

cmkimber commented 1 month ago

Using paste0 instead of glue(), party acronym is now on a separate line from vote counts in the labels. The acronym is not formatted in bold yet.

cmkimber commented 1 month ago

The positioning of the labels with ggrepel could benefit from some tweaking. Some labels are touching the plot while others are well-spaced away. Part of the issue is that the repellency of the labels is variable and settings will not affect all labels equally over many different graphs. Nonetheless, some tuning of the nudge_x parameter may be beneficial.