This function alters the internal representation of a plot to include links back to the actual
GitHub issue. This is currently implemented for viz_taskboard()
and viz_gantt()
viz_linked(g, filepath)
g | ggplot2 object returned by |
---|---|
filepath | Location to save resulting SVG file of ggplot2, if desired. Leave blank for
function to output message precisely as needed to render in HTML RMarkdown with chunk
option |
SVG version of ggplot2 object with links to relevant GitHub issues. Either writes output
to file or to console (to be captured in RMarkdown) depending on existence of filepath
argument
Credit goes to this Stack Overflow answer for figuring out how to do this: https://stackoverflow.com/questions/42259826/hyperlinking-text-in-a-ggplot2-visualization/42262407
# NOT RUN { # In R, to save to file: taskboard <- viz_taskboard(issues) viz_linked(taskboard, "my_folder/my_file.svg") # In RMarkdown chunk, to print as output: ```{r results = 'asis', echo = FALSE} gantt <- viz_gantt(issues) viz_linked(gantt) ```` # }