ggraph icon indicating copy to clipboard operation
ggraph copied to clipboard

Support for ggtext

Open fmgarciadiaz opened this issue 4 years ago • 3 comments

Hi! Could it be possible to add support for ggtext rich text in the geom_node_text function? That'd be great!

fmgarciadiaz avatar Jun 24 '21 00:06 fmgarciadiaz

That could be as simple as adding geom <- GeomRichTextoption in the geom_node_text function, and could provide the opportunity to add rich text and images to node description =)

fmgarciadiaz avatar Jun 27 '21 15:06 fmgarciadiaz

The default settings for fill, label.color, & label.padding in ggtext::GeomRichText behave more like ggraph::geom_node_label(). So using GeomRichText is very easy to do in geom_node_label() (I got a start here). But for within geom_node_text() I'm unsure how best to override the GeomRichText defaults to get rid of the fill & outline as a default behavior, and not override them if a user wants to manually override the defaults.

kelly-sovacool avatar Jun 29 '21 14:06 kelly-sovacool

That's amazing! TRUE, geom_node_label is the way to go. =)

fmgarciadiaz avatar Jun 29 '21 15:06 fmgarciadiaz